//库房编码转名称 void acware_ServiceLoad(object sender, YtClient.data.events.LoadEvent e) { EQWareInfo = e.Msg.GetDataTable(); TvList tv = TvList.newBind(); ((DataGridViewComboBoxColumn)this.ware1Cloumn).Items.Clear(); ((DataGridViewComboBoxColumn)this.ware2Cloumn).Items.Clear(); if (EQWareInfo != null) { foreach (DataRow r in EQWareInfo.Rows) { tv.add(r[1].ToString(), r[0].ToString()); } } tv.Bind(this.ware2Cloumn); tv.Bind(this.ware1Cloumn); }
void WarecodeToWareName() { DataTable EQWareInfo = LData.LoadDataTable("FindWareNameInEQDiaoBo", null, new object[] { His.his.Choscode }); TvList tv = TvList.newBind(); ((DataGridViewComboBoxColumn)this.ware1Cloumn).Items.Clear(); ((DataGridViewComboBoxColumn)this.TargetWarecodeColumn).Items.Clear(); if (EQWareInfo != null) { foreach (DataRow r in EQWareInfo.Rows) { tv.add(r[1].ToString(), r[0].ToString()); } } tv.Bind(TargetWarecodeColumn); tv.Bind(this.ware1Cloumn); }
//[来自设备使用] //使用状态的绑定 void BindStatusCode() { TvList tv = TvList.newBind(); DataTable dt = LData.LoadDataTable("FindUseStatusInCard", null, new object[] { His.his.Choscode.ToString() }); ((DataGridViewComboBoxColumn)Statuscode_Column).Items.Clear(); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { tv.add(dr["STATUSNAME"].ToString(), dr["STATUSCODE"].ToString()); } tv.Bind(Statuscode_Column); } }
//科室ID的绑定 void DeptidBind() { DataTable dt = LData.LoadDataTable("FindDeptIDNameInBuildCard", null, new object[] { His.his.Choscode.ToString() }); TvList tv = TvList.newBind(); ((DataGridViewComboBoxColumn)this.Deptid_Column).Items.Clear(); if (dt != null) { foreach (DataRow dr in dt.Rows) { tv.add(dr[1].ToString(), dr[0].ToString()); } tv.Bind(this.Deptid_Column); } }
private void UnitCodeBind() { DataTable dtUCB = LData.LoadDataTable("FindUnitNameInEQDiaoBo", null, null); TvList tv = TvList.newBind(); ((DataGridViewComboBoxColumn)this.Unitcode_Column).Items.Clear(); if (dtUCB != null) { foreach (DataRow item in dtUCB.Rows) { tv.add(item[1].ToString(), item[0].ToString()); } tv.Bind(Unitcode_Column); } }