//end Tab 2 /*Tab 3*/ private void tab3PHM_Hdr_ChActive_Click(object sender, EventArgs e) { mst_phm_cfg_hdr currenthdr = (mst_phm_cfg_hdr)PHM_hdr_bindingSource1.Current; if (currenthdr != null) { var data = (tab3PHM_Hdr_ChActive.Checked == true) ? 'A' : 'I'; var statusstr = currenthdr.mph_status; if (data != statusstr) { currenthdr.mph_status = data; } } }
private void PHM_hdr_bindingSource1_CurrentItemChanged(object sender, EventArgs e) { mst_phm_cfg_hdr currenthdr = (mst_phm_cfg_hdr)PHM_hdr_bindingSource1.Current; if (currenthdr != null) { //status if (currenthdr.mph_status == 'A') { tab3PHM_Hdr_ChActive.Checked = true; } else { tab3PHM_Hdr_ChActive.Checked = false; } } }
private void tab3PHM_Hdr_btnNew_Click(object sender, EventArgs e) { PHM_hdr_bindingSource1.AddNew(); DateTime dtnow = Program.GetServerDateTime(); mst_phm_cfg_hdr currenthdr = (mst_phm_cfg_hdr)PHM_hdr_bindingSource1.Current; if (currenthdr != null) { string username = Program.CurrentUser.mut_username; currenthdr.mph_status = 'A'; currenthdr.mph_effective_date = dtnow; currenthdr.mph_expire_date = dtnow.AddYears(1); currenthdr.mph_create_by = username; currenthdr.mph_create_date = dtnow; currenthdr.mph_update_by = username; currenthdr.mph_update_date = dtnow; tab3PHM_Hdr_ChActive.Checked = true; } }