public void loadBoxes(ATEscalationsDisplayModel model) { txtEID.Text = model.EscalationID; txt_Comments.Text = model.Comments; txt_CTRNumber.Text = model.CTRNumber; txt_Description.Text = model.ATEDescription; txt_PSNumber.Text = model.PeopleSoftNumber; txt_Qty.Text = model.Quantity.ToString(); txt_Resolution.Text = model.Resolution; cbo_MSO.Text = model.MSO; cbo_Status.Text = model.ATEStatus; cbo_Type.Text = model.ATEType; if (model.Product != null) { FormControlOps.markListBoxes(lst_PartNumber, model.Product); } dtp_DateReported.Value = model.DateReported; dtp_DateResolved.Value = model.ResolvedDate; if (model.FELead != null) { FormControlOps.markListBoxes(lst_FELead, model.FELead); } displayAttachments(); }
private void loadComboBoxLists() { List <MSO_Model> MSOs = GlobalConfig.Connection.GenericConditionalGetAll <MSO_Model>("tblMSO", "Active", "1", "MSO"); cboMSO.DataSource = MSOs; cboMSO.DisplayMember = "MSO"; cboMSO.SelectedIndex = -1; FormControlOps.populateListItems <ProductModel>(cboProduct, "tblProducts", "Product"); dataLoading = false; }
private void cboProduct_Leave(object sender, EventArgs e) { if (cboProduct.SelectedIndex < 0) { string newProduct = cboProduct.Text.ToUpper(); frmAddProduct ProductForm = new frmAddProduct(); ProductForm.Product = cboProduct.Text; ProductForm.ShowDialog(); FormControlOps.populateListItems <ProductModel>(cboProduct, "tblProducts", "Product"); cboProduct.Text = newProduct; } }