Exemplo n.º 1
0
 private void tab3PHMbtnsave_Click(object sender, EventArgs e)
 {
     try
     {
         PHM_hdr_bindingSource1.EndEdit();
         mstphmcfgdtlsBindingSource1.EndEdit();
         dbc.SubmitChanges();
         tab3PHMAlertmsg.Text = "Save data completed.";
     }
     catch (Exception ex)
     {
         Program.MessageError(ex.Message);
     }
 }
Exemplo n.º 2
0
        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;
            }
        }