/// <summary> /// 批次Tab切换 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddBatNoTabControl_SelectedIndexChanged(object sender, EventArgs e) { if (this.AddBatNoTabControl.SelectedTab.Text.Equals("新建批次")) { string cNo = this.GetCNO(this.AddBatNoTabControl.SelectedTab.Text); if (!string.IsNullOrEmpty(cNo)) { txt_batchNo.Text = "J" + productTypeCB.Text + workLineCB.SelectedValue + DateTime.Now.ToString("yyMMdd") + cNo; } workLineCB.DataSource = SelectListModel.WorkLineList().Keys.ToList(); txt_siloNo.DataSource = SelectListModel.SiloNumList().Keys.ToList(); nbtWeightCB.DataSource = SelectListModel.NbtWeightList(); gradeCB.DataSource = SelectListModel.GradeList(); } else { string cNo = this.GetCNO(this.AddBatNoTabControl.SelectedTab.Text); if (!string.IsNullOrEmpty(cNo)) { txt_bNo.Text = "J" + pdTypeCB.Text + wkLineCB.SelectedValue + DateTime.Now.ToString("yyMMdd") + cNo; } wkLineCB.DataSource = SelectListModel.WorkLineList().Keys.ToList(); txt_siloNum.DataSource = SelectListModel.SiloNumList().Keys.ToList(); txt_nbt.DataSource = SelectListModel.NbtWeightList(); txt_grade.DataSource = SelectListModel.GradeList(); } }
private void UpdateBatForm_Load(object sender, EventArgs e) { nbtWeightCB.DataSource = SelectListModel.NbtWeightList(); workLineCB.Text = batModel.workLine; txt_characteristics.Text = batModel.characteristics; siloNoCB.Text = batModel.siloNo; gradeCB.Text = batModel.grade; dtp_productDate.Value = (DateTime)batModel.productDate; nbtWeightCB.Text = batModel.ntbWeight.ToString(); }