private void gvSectionScreen_DoubleClick(object sender, EventArgs e) { frmUpdateSection frm = new frmUpdateSection(); frm.StartPosition = FormStartPosition.CenterScreen; frm.theSystemDBTag = theSystemDBTag; frm.UserCurrentInfo = UserCurrentInfo; frm.theAction = "EditOther"; var sectionID = gvSectionScreen.GetRowCellValue(gvSectionScreen.FocusedRowHandle, gvSectionScreen.Columns["SectionID"]).ToString(); frm.txtProdMonth.Text = Convert.ToDateTime(editProdmonth.EditValue).ToString("yyyyMM"); frm.txtSectionID.Text = Convert.ToString(sectionID); frm.txtSectionID.Enabled = false; var name = gvSectionScreen.GetRowCellValue(gvSectionScreen.FocusedRowHandle, gvSectionScreen.Columns["Name"]).ToString(); frm.txtName.Text = Convert.ToString(name); //var hierarchicalID = gvSectionScreen.GetRowCellValue(gvSectionScreen.FocusedRowHandle, gvSectionScreen.Columns["HierarchicalID"]).ToString(); //frm.txtHierarchicalID.Text = Convert.ToString(hierarchicalID); frm.ShowDialog(); }
private void btnAdd_Click(object sender, EventArgs e) { frmUpdateSection frm = new frmUpdateSection(); frm.StartPosition = FormStartPosition.CenterScreen; frm.theSystemDBTag = theSystemDBTag; frm.UserCurrentInfo = UserCurrentInfo; frm.theAction = "AddOther"; frm.txtProdMonth.Text = Convert.ToDateTime(editProdmonth.EditValue).ToString("yyyyMM"); frm.ShowDialog(); loadScreenData(); }