public void GetReport_PriodicValuesTest_Dependent() { BPersonMonthlyWorkedTime bpWorkTime = new BPersonMonthlyWorkedTime(32687); IList <PersonalMonthlyReportRow> DailyRows = null; PersonalMonthlyReportRow MonthlyRow = null; bpWorkTime.GetPersonMonthlyReport(1390, 7, "1390/06/16", "1390/07/15", out DailyRows, out MonthlyRow); Assert.IsTrue(MonthlyRow.PeriodicPresenceDuration != "00:00" && MonthlyRow.PeriodicPresenceDuration != ""); }
protected void Button3_Click(object sender, EventArgs e) { LanguagesName l = GTS.Clock.Business.AppSettings.BLanguage.CurrentLocalLanguage; PersianDateTime dt = new PersianDateTime(DateTime.Now); BPersonMonthlyWorkedTime pb = new BPersonMonthlyWorkedTime(BUser.CurrentUser.Person.ID); IList <PersonalMonthlyReportRow> list1; PersonalMonthlyReportRow monthlyRow; pb.GetPersonMonthlyReport(1391, 5, "1391/07/20", "1391/08/19", out list1, out monthlyRow); string value = monthlyRow.HourlyPureOperation; }
public void GetReport_PersonalMonthlyReportTest() { try { PersianDateTime dt = new PersianDateTime(DateTime.Now); BPersonMonthlyWorkedTime pb = new BPersonMonthlyWorkedTime(32688); IList <PersonalMonthlyReportRow> list1; PersonalMonthlyReportRow monthlyRow; pb.GetPersonMonthlyReport(1390, 6, "1390/06/01", "1390/06/31", out list1, out monthlyRow); string value = monthlyRow.PeriodicDailyPureOperation; } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void GetReport_PersonalMonthlyReportPropertyTest() { try { BPersonMonthlyWorkedTime bpWorkTime = new BPersonMonthlyWorkedTime(32688); IList <PersonalMonthlyReportRow> DailyRows = null; PersonalMonthlyReportRow MonthlyRow = null; bpWorkTime.GetPersonMonthlyReport(1390, 6, "1390/05/10", "1390/06/15", out DailyRows, out MonthlyRow); string value = DailyRows[0].DailySickLeave; value = DailyRows[1].DailySickLeave; } catch (Exception Exception) { Assert.Fail(Exception.Message); } }
public void GetReport_EmptyDateRangeValidate() { try { BPersonMonthlyWorkedTime bpWorkTime = new BPersonMonthlyWorkedTime(ADOPerson1.ID); IList <PersonalMonthlyReportRow> DailyRows = null; PersonalMonthlyReportRow MonthlyRow = null; bpWorkTime.GetPersonMonthlyReport(2000, 2, "", "", out DailyRows, out MonthlyRow); PersonalMonthlyReportRow pmrr = DailyRows[0]; Assert.Fail("دوره محاسبات ندارد"); } catch (InvalidDatabaseStateException ex) { Assert.Pass(ex.Message); } catch (Exception ex) { Assert.Fail(ex.Message); } }
protected void Button42_Click(object sender, EventArgs e) { #region SetGridColumnsSize_MasterMonthlyOperation BGridMonthlyOperationClientSettings MonthlyOperationGridClientSettingsBusiness = new BGridMonthlyOperationClientSettings(); MonthlyOperationGridClientGeneralSettings monthlyOperationGridClientGeneralSettings = MonthlyOperationGridClientSettingsBusiness.GetMonthlyOperationGridGeneralClientSettings(); #endregion #region SetVisibleColumns_MasterMonthlyOperation MonthlyOperationGridClientSettings monthlyOperationGridClientSettings = MonthlyOperationGridClientSettingsBusiness.GetMonthlyOperationGridClientSettings(); #endregion #region SetReserveFieldsHeaderColumnsCaption_MasterMonthlyOperation BPersonMonthlyWorkedTime MonthlyOperationBusiness = new BPersonMonthlyWorkedTime(0); IDictionary <ConceptReservedFields, string> dic = MonthlyOperationBusiness.GetReservedFieldsNames(); /*foreach (string conceptReservedFieldName in Enum.GetNames(typeof(ConceptReservedFields))) * { * string HeadingText = MonthlyOperationBusiness.GetReservedFieldsName((ConceptReservedFields)Enum.Parse(typeof(ConceptReservedFields), conceptReservedFieldName)); * }*/ #endregion #region Fill_GridMasterMonthlyOperation_MasterMonthlyOperation IList <PersonalMonthlyReportRow> PersonnelMonthlyOperationList = null; PersonalMonthlyReportRow PersonnelSummaryMonthlyOperation = null; try { decimal PersonnelID = BUser.CurrentUser.Person.ID; BPersonMonthlyWorkedTime MonthlyOperationBusiness1 = new BPersonMonthlyWorkedTime(PersonnelID); MonthlyOperationBusiness.GetPersonMonthlyReport(1391, 12, "1391/12/01", "1391/12/29", out PersonnelMonthlyOperationList, out PersonnelSummaryMonthlyOperation); Dictionary <string, object> MonthlyOperationSourceDic = new Dictionary <string, object>(); MonthlyOperationSourceDic.Add("Details", PersonnelMonthlyOperationList); MonthlyOperationSourceDic.Add("Summary", PersonnelSummaryMonthlyOperation); } catch { } #endregion }
public void GetUnderManagmentBySearch_BarcodeTest22222() { try { BPersonMonthlyWorkedTime bpWorkTime = new BPersonMonthlyWorkedTime(32687); IList <PersonalMonthlyReportRow> DailyRows = null; PersonalMonthlyReportRow MonthlyRow = null; bpWorkTime.GetPersonMonthlyReport(1390, 7, "1390/08/01", "1390/08/30", out DailyRows, out MonthlyRow); string a = DailyRows[0].UnallowableOverTime; IList <PersonalMonthlyReportRow> xxx = DailyRows.Where(x => x.HourlyPureOperation != "00:00").ToList(); PersonalMonthlyReportRow pmrr = DailyRows[2]; string x0 = pmrr.ImpureOperation; string x1 = pmrr.PeriodicDailyAbsence; string x2 = pmrr.DailyAbsence; User user = BUser.CurrentUser; IList <MonthlyDetailReportProxy> list2 = bpWorkTime.GetPersonMonthlyRowDetail(new DateTime(2011, 9, 7)); } catch (Exception ex) { } }
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); } }