private void Fill_GridMasterMonthlyOperation_MasterMonthlyOperation(LoadState LS, decimal PersonnelID, int Year, int Month, string FromDate, string ToDate)
        {
            string[] retMessage = new string[4];
            IList <PersonalMonthlyReportRow> PersonnelMonthlyOperationList    = null;
            PersonalMonthlyReportRow         PersonnelSummaryMonthlyOperation = null;

            try
            {
                if (Session["Year_MasterMonthlyOperation"] != null)
                {
                    if ((int)Session["Year_MasterMonthlyOperation"] != Year)
                    {
                        Session["MonthlyOperationSource_MasterMonthlyOperation"] = null;
                    }
                }
                if (Session["Month_MasterMonthlyOperation"] != null)
                {
                    if ((int)Session["Month_MasterMonthlyOperation"] != Month)
                    {
                        Session["MonthlyOperationSource_MasterMonthlyOperation"] = null;
                    }
                }
                if (Session["MonthlyOperationSource_MasterMonthlyOperation"] == null)
                {
                    switch (LS)
                    {
                    case LoadState.Manager:
                        break;

                    case LoadState.Personnel:
                        PersonnelID = BUser.CurrentUser.Person.ID;
                        break;
                    }

                    BPersonMonthlyWorkedTime MonthlyOperationBusiness = new BPersonMonthlyWorkedTime(PersonnelID);
                    MonthlyOperationBusiness.GetPersonMonthlyReport(Year, Month, FromDate, ToDate, out PersonnelMonthlyOperationList, out PersonnelSummaryMonthlyOperation);
                    //DateRangeHelper drh = new DateRangeHelper();
                    //drh.GetPersonMonthlyReport(Year, Month, FromDate, ToDate, out PersonnelMonthlyOperationList, out PersonnelSummaryMonthlyOperation);

                    Session.Add("Year_MasterMonthlyOperation", Year);
                    Session.Add("Month_MasterMonthlyOperation", Month);
                    Dictionary <string, object> MonthlyOperationSourceDic = new Dictionary <string, object>();
                    MonthlyOperationSourceDic.Add("Details", PersonnelMonthlyOperationList);
                    MonthlyOperationSourceDic.Add("Summary", PersonnelSummaryMonthlyOperation);
                    Session.Add("MonthlyOperationSource_MasterMonthlyOperation", MonthlyOperationSourceDic);
                }
                this.operationYearMonthProvider.SetOperationYearMonth(Year, Month);
                GridMasterMonthlyOperation_MasterMonthlyOperation.DataSource = (IList <PersonalMonthlyReportRow>)((Dictionary <string, object>)Session["MonthlyOperationSource_MasterMonthlyOperation"])["Details"];
                GridMasterMonthlyOperation_MasterMonthlyOperation.DataBind();
            }
            catch (UIValidationExceptions ex)
            {
                retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage);
                this.ErrorHiddenField_MonthlyOperation.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            }
            catch (UIBaseException ex)
            {
                retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage);
                this.ErrorHiddenField_MonthlyOperation.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            }
            catch (Exception ex)
            {
                retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage);
                this.ErrorHiddenField_MonthlyOperation.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
            }
        }
 public void GridMasterMonthlyOperation_MasterMonthlyOperation_NeedRebind(object sender, EventArgs e)
 {
     GridMasterMonthlyOperation_MasterMonthlyOperation.DataBind();
 }