예제 #1
0
        private void ScoreBoard_Load(object sender, EventArgs e)
        {
            dbc.BindMonth(lookUpEditMonth);
            dbc.BindYear(lookUpEditYear);
            var htMonth = new Hashtable();

            htMonth.Add("@Trans", "GET_CURRENT_MONTH");
            var dtMonth = new DataAccess().ExecuteSP("Sp_Score_Board", htMonth);

            if (dtMonth.Rows.Count > 0)
            {
                lookUpEditMonth.EditValue = dtMonth.Rows[0]["C_Month"];
            }
            var htYear = new Hashtable();

            htYear.Add("@Trans", "CURRENT_YEAR");
            var dtYear = dataaccess.ExecuteSP("Sp_Score_Board", htYear);

            if (dtYear != null && dtYear.Rows.Count > 0)
            {
                lookUpEditYear.EditValue = dtYear.Rows[0]["Year"];
            }
            else
            {
                lookUpEditYear.EditValue = null;
            }
            this.WindowState = FormWindowState.Maximized;
        }
예제 #2
0
 private void Efficiency_Summary_Load(object sender, EventArgs e)
 {
     try
     {
         SplashScreenManager.ShowForm(this, typeof(Masters.WaitForm1), true, true, false);
         WindowState = FormWindowState.Maximized;
         checkEditCustomize.Checked = false;
         dbc.BindMonth(lookUpEditMonth);
         dbc.BindYear(lookUpEditYear);
         lookUpEditMonth.EditValue = DateTime.Now.Month;
         lookUpEditYear.EditValue  = DateTime.Now.Year;
     }
     catch (Exception ex)
     {
         SplashScreenManager.CloseForm(false);
         XtraMessageBox.Show("Something went wrong check with admin");
     }
     finally
     {
         SplashScreenManager.CloseForm(false);
     }
 }