private void frmChooseSocialInsurance_Load(object sender, System.EventArgs e)
 {
     Refresh();
     cboYear.SelectedIndex = 0;
     insuranceDO = new SocialInsuranceDO();
     PopulateListInsuranInYear();
     this.cboYear.SelectedIndexChanged += new System.EventHandler(this.cboYear_SelectedIndexChanged);
 }
Beispiel #2
0
        private void frmSocialSheet_Load(object sender, System.EventArgs e)
        {
            Refresh();
            if(selectedRowIndex >= 0)//Sửa dữ liệu
            {
                DataRow dr = dsSocialInsurance.Tables[0].Rows[selectedRowIndex];
                dtpFromDate.Text = dr["StartPointDate"].ToString();
                DtpToDate.Text = dr["EndPointDate"].ToString();
                periodID = int.Parse(dr["PeriodID"].ToString());
                dtpFromDate.Enabled = false;
                DtpToDate.Enabled = false;
            //				btnGennerateSocial.Enabled = false;
            }
            else
            {
                dtpFromDate.Enabled = false;

            }

            PopulateDepartmentCombo();
            socialInsuranceD0 = new SocialInsuranceDO();
            PopulateSocialSheet(dtpFromDate.Value,dtpToDate.Value);
            //			this.dtpToDate.ValueChanged += new System.EventHandler(this.dtpToDate_ValueChanged);
        }