⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sendmedicine.h

📁 医院管理系统 本系统包括说明文件,运行文件,希望站长接受如此好的系统.
💻 H
📖 第 1 页 / 共 2 页
字号:
			this->tBoxName->Location = System::Drawing::Point(248, 88);
			this->tBoxName->Name = S"tBoxName";
			this->tBoxName->Size = System::Drawing::Size(120, 21);
			this->tBoxName->TabIndex = 6;
			this->tBoxName->Text = S"";
			// 
			// label8
			// 
			this->label8->Location = System::Drawing::Point(184, 96);
			this->label8->Name = S"label8";
			this->label8->Size = System::Drawing::Size(56, 11);
			this->label8->TabIndex = 5;
			this->label8->Text = S"姓名";
			// 
			// tBoxStartTime
			// 
			this->tBoxStartTime->Location = System::Drawing::Point(448, 32);
			this->tBoxStartTime->Name = S"tBoxStartTime";
			this->tBoxStartTime->Size = System::Drawing::Size(120, 21);
			this->tBoxStartTime->TabIndex = 4;
			this->tBoxStartTime->Text = S"";
			// 
			// label2
			// 
			this->label2->Location = System::Drawing::Point(384, 40);
			this->label2->Name = S"label2";
			this->label2->Size = System::Drawing::Size(56, 11);
			this->label2->TabIndex = 3;
			this->label2->Text = S"开始时间";
			// 
			// tBoxID
			// 
			this->tBoxID->Location = System::Drawing::Point(248, 32);
			this->tBoxID->Name = S"tBoxID";
			this->tBoxID->Size = System::Drawing::Size(120, 21);
			this->tBoxID->TabIndex = 2;
			this->tBoxID->Text = S"";
			// 
			// label1
			// 
			this->label1->Location = System::Drawing::Point(184, 40);
			this->label1->Name = S"label1";
			this->label1->Size = System::Drawing::Size(56, 11);
			this->label1->TabIndex = 1;
			this->label1->Text = S"编号";
			// 
			// btnSearch
			// 
			this->btnSearch->ImageAlign = System::Drawing::ContentAlignment::MiddleLeft;
			this->btnSearch->ImageIndex = 6;
			this->btnSearch->ImageList = this->imageList1;
			this->btnSearch->Location = System::Drawing::Point(40, 56);
			this->btnSearch->Name = S"btnSearch";
			this->btnSearch->Size = System::Drawing::Size(56, 24);
			this->btnSearch->TabIndex = 0;
			this->btnSearch->Text = S"搜索";
			this->btnSearch->TextAlign = System::Drawing::ContentAlignment::MiddleRight;
			this->btnSearch->Click += new System::EventHandler(this, btnSearch_Click);
			// 
			// imageList1
			// 
			this->imageList1->ImageSize = System::Drawing::Size(16, 16);
			this->imageList1->ImageStream = (__try_cast<System::Windows::Forms::ImageListStreamer *  >(resources->GetObject(S"imageList1.ImageStream")));
			this->imageList1->TransparentColor = System::Drawing::Color::Transparent;
			// 
			// dgrdPrice
			// 
			this->dgrdPrice->DataMember = S"";
			this->dgrdPrice->Dock = System::Windows::Forms::DockStyle::Top;
			this->dgrdPrice->HeaderForeColor = System::Drawing::SystemColors::ControlText;
			this->dgrdPrice->Location = System::Drawing::Point(0, 128);
			this->dgrdPrice->Name = S"dgrdPrice";
			this->dgrdPrice->Size = System::Drawing::Size(736, 176);
			this->dgrdPrice->TabIndex = 2;
			this->dgrdPrice->CurrentCellChanged += new System::EventHandler(this, dgrdPrice_CurrentCellChanged);
			// 
			// dgrdPriceDetail
			// 
			this->dgrdPriceDetail->DataMember = S"";
			this->dgrdPriceDetail->Dock = System::Windows::Forms::DockStyle::Fill;
			this->dgrdPriceDetail->HeaderForeColor = System::Drawing::SystemColors::ControlText;
			this->dgrdPriceDetail->Location = System::Drawing::Point(0, 304);
			this->dgrdPriceDetail->Name = S"dgrdPriceDetail";
			this->dgrdPriceDetail->Size = System::Drawing::Size(736, 125);
			this->dgrdPriceDetail->TabIndex = 4;
			// 
			// SendMedicine
			// 
			this->AutoScaleBaseSize = System::Drawing::Size(6, 14);
			this->ClientSize = System::Drawing::Size(736, 429);
			this->Controls->Add(this->dgrdPriceDetail);
			this->Controls->Add(this->dgrdPrice);
			this->Controls->Add(this->groupBox1);
			this->Name = S"SendMedicine";
			this->Text = S"药房管理";
			this->groupBox1->ResumeLayout(false);
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dgrdPrice))->EndInit();
			(__try_cast<System::ComponentModel::ISupportInitialize *  >(this->dgrdPriceDetail))->EndInit();
			this->ResumeLayout(false);

		}		
	private:
	
		//-----------------------设置表格各列的属性-----------------------
		void DataGridStateControl()
		{

			DataGridTableStyle* ts = new DataGridTableStyle();			
			ts->MappingName = this->ds->Tables->Item[S"门诊划价"]->TableName;
			
			DataGridNoActiveCellColumn* aTextColumn;
			ts->AllowSorting = false;
			ts->AlternatingBackColor = Color::LightGray;

			int numCols = this->ds->Tables->Item[S"门诊划价"]->Columns->Count;
			for(int i = 0;i < numCols;i++)
			{
				aTextColumn = new DataGridNoActiveCellColumn();
				aTextColumn->get_TextBox()->Enabled = false;
				aTextColumn->MappingName = this->ds->Tables->Item[S"门诊划价"]->Columns->Item[i]->ColumnName;
				aTextColumn->HeaderText = this->ds->Tables->Item[S"门诊划价"]->Columns->Item[i]->ColumnName;
				aTextColumn->NullText = S"";
				aTextColumn->Format = S"D";
				ts->GridColumnStyles->Add(aTextColumn);
			}

			this->dgrdPrice->TableStyles->Add(ts);

			ts = new DataGridTableStyle();			
			ts->MappingName = this->ds->Tables->Item[S"门诊划价明细"]->TableName;			
	
			ts->AllowSorting = false;
			ts->AlternatingBackColor = Color::LightGray;

			numCols = this->ds->Tables->Item[S"门诊划价明细"]->Columns->Count;
			for(int i = 0;i < numCols;i++)
			{
				aTextColumn = new DataGridNoActiveCellColumn();
				aTextColumn->get_TextBox()->Enabled = false;
				aTextColumn->MappingName = this->ds->Tables->Item[S"门诊划价明细"]->Columns->Item[i]->ColumnName;
				aTextColumn->HeaderText = this->ds->Tables->Item[S"门诊划价明细"]->Columns->Item[i]->ColumnName;
				aTextColumn->NullText = S"";
				aTextColumn->Format = S"D";
				ts->GridColumnStyles->Add(aTextColumn);
			}

			this->dgrdPriceDetail->TableStyles->Add(ts);
  		 }		
		 //按条件查询
private: System::Void btnSearch_Click(System::Object *  sender, System::EventArgs *  e)
		 {
			 String* strID = this->tBoxID->Text->Trim();
			 String* strName = this->tBoxName->Text->Trim();
			 String* strStartTime = this->tBoxStartTime->Text->Trim();
			 String* strEndTime = this->tBoxEndTime->Text->Trim();
			 String* Filter = S"";
			 if(String::Compare(strID,String::Empty) != 0)
			 {
				 Filter = String::Format(S"{0} AND (编号 LIKE '%{1}%')",Filter,strID);
			 }
			 if(String::Compare(strName,String::Empty) != 0)
			 {
				 Filter = String::Format(S"{0} AND (姓名 LIKE '%{1}%')",Filter,strName);
			 }
			 if(String::Compare(strStartTime,String::Empty) != 0)
			 {
				 Filter = String::Format(S"{0} AND (划价时间 >= '{1}')",Filter,strStartTime);
			 }
			 if(String::Compare(strEndTime,String::Empty) != 0)
			 {
				 Filter = String::Format(S"{0} AND (划价时间 <= '{1}')",Filter,strEndTime);
			 }

			 this->ds->Tables->Item[S"门诊划价"]->Clear();

			 if(String::Compare(Filter,String::Empty) != 0)
			 {
				 Filter = Filter->Substring(5,Filter->Length - 5);
				 //查询门诊划价
				 this->strSQL = String::Format(S"SELECT 门诊挂号.姓名, 门诊挂号.性别, 门诊划价.编号, 门诊划价.科室, 门诊划价.挂号编号, 门诊划价.医生, 门诊划价.划价时间, 门诊划价.是否收费, 门诊划价.划价员, 门诊划价.收费员, 门诊划价.收费时间, 门诊划价.划价金额, 门诊划价.是否发药, 门诊划价.发药时间, 门诊划价.发药员 FROM 门诊划价 Where 门诊划价.是否收费 = '否' AND {0}INNER JOIN 门诊挂号 ON 门诊划价.编号 = 门诊挂号.编号",Filter);
				 this->strTableName = S"门诊划价";
				 this->MyDataBase->SelectDataBase(this->ChargeAdapter,this->ds,this->strSQL,this->strTableName);
				 this->PriceView->Table = this->ds->Tables->Item[S"门诊划价"];   
			 }			 
		 }
		 //发药
private: System::Void btnReceive_Click(System::Object *  sender, System::EventArgs *  e)
		 {			 
			 int row = this->dgrdPrice->CurrentRowIndex;
			 String* tempSQL = String::Format(S"exec sf_药品发出 {0}",this->ds->Tables->Item[S"门诊划价"]->Rows->Item[row]->Item[S"编号"]->ToString());
			 this->MyDataBase->SQLOperate(tempSQL);

			 //tempSQL = String::Format(S"Update 门诊划价 Set 是否发药 = '是' Where 编号 = '{0}'",this->ds->Tables->Item[S"门诊划价"]->Rows->Item[row]->Item[S"编号"]->ToString());
			 //this->MyDataBase->SQLOperate(tempSQL);
			 this->ds->Clear();
			 //查询门诊划价
			this->strSQL = S"SELECT 门诊挂号.姓名, 门诊挂号.性别, 门诊划价.编号, 门诊划价.科室, 门诊划价.挂号编号, 门诊划价.医生, 门诊划价.划价时间, 门诊划价.是否收费, 门诊划价.划价员, 门诊划价.收费员, 门诊划价.收费时间, 门诊划价.划价金额, 门诊划价.是否发药, 门诊划价.发药时间, 门诊划价.发药员 FROM 门诊划价 INNER JOIN 门诊挂号 ON 门诊划价.挂号编号 = 门诊挂号.编号 Where 门诊划价.是否收费 = '是' AND 门诊划价.是否发药 = '否'";
			this->strTableName = S"门诊划价";
			this->MyDataBase->SelectDataBase(this->ChargeAdapter,this->ds,this->strSQL,this->strTableName);

			//查询门诊划价明细
			this->strSQL = S"SELECT 门诊划价明细.编号, 门诊划价明细.划价编号, 门诊划价明细.药品编号, 药品资料.名称, 门诊划价明细.单价, 门诊划价明细.数量, 门诊划价明细.金额 FROM  门诊划价明细 INNER JOIN 药品资料 ON 门诊划价明细.药品编号 = 药品资料.编号";
			this->strTableName = S"门诊划价明细";
			this->MyDataBase->SelectDataBase(this->ChargeAdapter,this->ds,this->strSQL,this->strTableName);			
		 }
		 //门诊划价明细
private: System::Void dgrdPrice_CurrentCellChanged(System::Object *  sender, System::EventArgs *  e)
		 {
			 int row = this->dgrdPrice->CurrentRowIndex;
			 this->DetailView->RowFilter = String::Format(S"划价编号 = '{0}'",this->ds->Tables->Item[S"门诊划价"]->Rows->Item[row]->Item[S"编号"]->ToString());
		 }



};
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -