Exemplo n.º 1
0
        private void Ch_configHeader_IsActive_MouseClick(object sender, MouseEventArgs e)
        {
            mst_config_hdr currenthdr = (mst_config_hdr)ConfigHeader_bindingSource1.Current;

            if (currenthdr != null)
            {
                var data      = (Ch_configHeader_IsActive.Checked == true) ? 'A' : 'I';
                var statusstr = currenthdr.mfh_status;
                if (data != statusstr)
                {
                    currenthdr.mfh_status = data;
                }
            }
        }
Exemplo n.º 2
0
        private void ConfigHeader_bindingSource1_CurrentItemChanged(object sender, EventArgs e)
        {
            mst_config_hdr currenthdr = (mst_config_hdr)ConfigHeader_bindingSource1.Current;

            if (currenthdr != null)
            {
                //status
                if (currenthdr.mfh_status == 'A')
                {
                    Ch_configHeader_IsActive.Checked = true;
                }
                else
                {
                    Ch_configHeader_IsActive.Checked = false;
                }
            }
        }
Exemplo n.º 3
0
        private void btntab1_NewConfig_Header_Click(object sender, EventArgs e)
        {
            ConfigHeader_bindingSource1.AddNew();
            DateTime       dtnow      = Program.GetServerDateTime();
            mst_config_hdr currenthdr = (mst_config_hdr)ConfigHeader_bindingSource1.Current;

            if (currenthdr != null)
            {
                string username = Program.CurrentUser.mut_username;
                int    mshid    = (from t1 in dbc.mst_hpc_sites select t1.mhs_id).FirstOrDefault();
                currenthdr.mhs_id             = mshid;
                currenthdr.mfh_status         = 'A';
                currenthdr.mfh_effective_date = dtnow;
                currenthdr.mfh_expire_date    = dtnow.AddYears(1);
                currenthdr.mfh_create_by      = username;
                currenthdr.mfh_create_date    = dtnow;
                currenthdr.mfh_update_by      = username;
                currenthdr.mfh_update_date    = dtnow;

                Ch_configHeader_IsActive.Checked = true;
            }
        }