protected void Page_Load(object sender, EventArgs e) { //ReportParameter EmployeeCodeID = new ReportParameter("EmployeeCodeID", Request.QueryString["ID"].ToString()); //string ReportName = string.Empty; //string strFileName = string.Empty; //ReportServicesMethod RSM = new ReportServicesMethod(); //if (!Page.IsPostBack) //{ // ReportName = "PromotionCard"; // strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, EmployeeCodeID); // if (!string.IsNullOrEmpty(strFileName)) // Response.Redirect(strFileName); //} ReportParameter PromotionPeriodID = new ReportParameter("PromotionPeriodID", Request.QueryString["PromotionPeriodID"].ToString()); ReportParameter EmployeeCodeID = new ReportParameter("EmployeeCodeID", Request.QueryString["EmployeeCodeID"].ToString()); string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "PromotionCard"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, EmployeeCodeID, PromotionPeriodID); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { int EndOfServiceID = 0; ReportParameter RpEndOfServiceID = new ReportParameter("EndOfServiceID"); if (Request.QueryString["EndOfServiceID"] != "") { EndOfServiceID = int.Parse(Request.QueryString["EndOfServiceID"].ToString()); RpEndOfServiceID.Values.Add(EndOfServiceID.ToString()); } string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "EndOfService"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, RpEndOfServiceID); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { int PromotionRecordID = 0; int? CurrentEmployeeCareerHistoryID = null; ReportParameter RpPromotionRecordID = new ReportParameter("PromotionRecordID"); ReportParameter RpCurrentEmployeeCareerHistoryID = new ReportParameter("CurrentEmployeeCareerHistoryID"); if (Request.QueryString["PromotionRecordID"] != "") { PromotionRecordID = int.Parse(Request.QueryString["PromotionRecordID"].ToString()); RpPromotionRecordID.Values.Add(PromotionRecordID.ToString()); } if (Request.QueryString["EmployeeCarrerHistoryID"] != "") { CurrentEmployeeCareerHistoryID = int.Parse(Request.QueryString["EmployeeCarrerHistoryID"].ToString()); RpCurrentEmployeeCareerHistoryID.Values.Add(CurrentEmployeeCareerHistoryID.Value.ToString()); } string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "PromotionsDecisions"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, RpPromotionRecordID, RpCurrentEmployeeCareerHistoryID); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "AssigningOrphanRecords"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { ReportParameter PromotionPeriodID = new ReportParameter("PromotionPeriodID", Request.QueryString["PromotionPeriodID"] != "" ? Request.QueryString["PromotionPeriodID"].ToString() : null); string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "PromotionRecordsCountByPromotionPeriod"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, PromotionPeriodID); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { ReportParameter RankID = new ReportParameter("RankID", Request.QueryString["ID"].ToString()); string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "JobVacanciesByRank"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, RankID); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { ReportParameter VacationTypeID = new ReportParameter("VacationTypeID", Request.QueryString["VacationTypeID"] != "" ? Request.QueryString["VacationTypeID"].ToString() : null); ReportParameter StartDate = new ReportParameter("StartDate", Request.QueryString["StartDate"].ToString()); ReportParameter EndDate = new ReportParameter("EndDate", Request.QueryString["EndDate"].ToString()); string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "VacationsTodayByVacationType"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, VacationTypeID, StartDate, EndDate); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { ReportParameter StopWorkEnded = new ReportParameter("StopWorkEnded", Request.QueryString["StopWorkEnded"] != "" ? Request.QueryString["StopWorkEnded"].ToString() : null); ReportParameter EmployeeCodeID = new ReportParameter("EmployeeCodeID", Request.QueryString["EmployeeCodeID"] != "" ? Request.QueryString["EmployeeCodeID"].ToString() : null); ReportParameter ReportTitle = new ReportParameter("ReportTitle", Request.QueryString["ReportTitle"] != "" ? Request.QueryString["ReportTitle"].ToString() : null); string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "StopWorksByEndedStatusAndEmployeeCode"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, StopWorkEnded, EmployeeCodeID, ReportTitle); if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { string PromotionCardPrintingID = Request.QueryString["PromotionCardPrintingID"].ToString(); ReportParameter PromotionPeriodID = new ReportParameter("PromotionPeriodID", Request.QueryString["PromotionPeriodID"].ToString()); ReportParameter EmployeeCodeID = new ReportParameter("EmployeeCodeID", Request.QueryString["EmployeeCodeID"].ToString()); ReportParameter IsApprovedYouHaveJobWithAllowncesAndGotJobWithoutAllownces = new ReportParameter("IsApprovedYouHaveJobWithAllowncesAndGotJobWithoutAllownces", Request.QueryString["IsApprovedYouHaveJobWithAllowncesAndGotJobWithoutAllownces"].ToString()); string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { ReportName = "AfterRatificationPromotionCard"; strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, EmployeeCodeID, PromotionPeriodID, IsApprovedYouHaveJobWithAllowncesAndGotJobWithoutAllownces); if (!string.IsNullOrEmpty(strFileName)) { string ShardPDFFolderForPromotionCard = ConfigurationManager.AppSettings["ShardPDFFolderForPromotionCard"]; string PdfFilePath = Server.MapPath(strFileName); System.IO.File.Copy(PdfFilePath, string.Format("{0}{1}.{2}", ShardPDFFolderForPromotionCard, PromotionCardPrintingID, "pdf")); } } }
protected void Page_Load(object sender, EventArgs e) { ReportParameter EmployeeCodeID = new ReportParameter("EmployeeCodeID", Request.QueryString["ID"].ToString()); string Type = Request.QueryString["Type"].ToString(); string ReportName = string.Empty; string strFileName = string.Empty; ReportServicesMethod RSM = new ReportServicesMethod(); if (!Page.IsPostBack) { if (Type.Equals(BusinessSubCategoriesEnum.Assignings.ToString())) { ReportName = "AssigningsByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.Delegations.ToString())) { ReportName = "DelegationsByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.Lenders.ToString())) { ReportName = "LendersByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.OverTimes.ToString())) { ReportName = "OverTimesByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.PassengerOrders.ToString())) { ReportName = "PassengerOrdersByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.EmployeesAllowances.ToString())) { ReportName = "EmployeesAllowancesByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.GovernmentFunds.ToString())) { ReportName = "GovernmentFundsByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.InternshipScholarships.ToString())) { ReportName = "InternshipScholarshipsByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.Vacations.ToString())) { ReportName = "VacationsByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.Scholarships.ToString())) { ReportName = "ScholarshipByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.EmployeesQualifications.ToString())) { ReportName = "EmployeesQualificationsByEmployee"; } else if (Type.Equals(BusinessSubCategoriesEnum.EmployeesExperiencesDetails.ToString())) { ReportName = "EmployeesExperiencesDetailsByEmployee"; } } if (!Page.IsPostBack) { // Associated with Task 298: Showing the total experiences days of employee in printing template if (Type.Equals(BusinessSubCategoriesEnum.EmployeesExperiencesDetails.ToString())) { int years, months, days; int employeeCodeID = Convert.ToInt32(Request.QueryString["ID"].ToString()); new EmployeeExperiencesWithDetailsBLL().GetTotalEmployeeExperienceInYMD(employeeCodeID, out years, out months, out days); ReportParameter ParamYears = new ReportParameter("years", years.ToString()); ReportParameter ParamMonths = new ReportParameter("months", months.ToString()); ReportParameter ParamDays = new ReportParameter("days", days.ToString()); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, EmployeeCodeID, ParamYears, ParamMonths, ParamDays); } else { strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, ReportName, EmployeeCodeID); } if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName); } } }
protected void Page_Load(object sender, EventArgs e) { try { string ID = Request.QueryString["ID"].ToString(); string Type = Request.QueryString["type"].ToString(); ReportServicesMethod RSM = new ReportServicesMethod(); string strFileName = string.Empty; if (!Page.IsPostBack) { ReportParameter EmployeeName = new ReportParameter("EmployeeName", Session["EmployeeName"].ToString()); if (Type.Equals(BusinessSubCategoriesEnum.Assignings.ToString())) { ReportParameter AssigningID = new ReportParameter("AssigningID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "Assigning", AssigningID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.Delegations.ToString())) { ReportParameter DelegationID = new ReportParameter("DelegationID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "Delegation", DelegationID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.PassengerOrders.ToString())) { ReportParameter PassengerOrderID = new ReportParameter("PassengerOrderID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "PassengerOrder", PassengerOrderID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.Lenders.ToString())) { ReportParameter LenderID = new ReportParameter("LenderID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "Lender", LenderID, EmployeeName); } else if (Type.Equals("EmployeeScholarship")) { ReportParameter ScholarshipID = new ReportParameter("ScholarshipID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "Scholarship", ScholarshipID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.OverTimes.ToString())) { ReportParameter OverTimeID = new ReportParameter("OverTimeID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "OverTime", OverTimeID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.Transfers.ToString())) { ReportParameter TransferID = new ReportParameter("TransferID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "Transfer", TransferID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.GovernmentFunds.ToString())) { ReportParameter GovernmentFundID = new ReportParameter("GovernmentFundID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "GovernmentFunds", GovernmentFundID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.GovernmentFundsDeactivation.ToString())) { ReportParameter GovernmentFundID = new ReportParameter("GovernmentFundID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "GovernmentFundsDeactivation", GovernmentFundID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.EmployeesAllowances.ToString())) { ReportParameter EmployeeAllowanceID = new ReportParameter("EmployeeAllowanceID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "EmployeeAllowance", EmployeeAllowanceID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.InternshipScholarships.ToString())) { ReportParameter InternshipScholarshipID = new ReportParameter("InternshipScholarshipID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "InternshipScholarship", InternshipScholarshipID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.Vacations.ToString())) { VacationsDetailsBLL VacationDetail = new VacationsDetailsBLL().GetVacationsDetailsByVacationDetailID(int.Parse(ID)); ReportParameter VacationDetailID = new ReportParameter("VacationDetailID", ID); ReportParameter VacationID = new ReportParameter("VacationID", VacationDetail.Vacation.VacationID.ToString()); if (VacationDetail.VacationAction.VacationActionID == (int)VacationsActionsEnum.Add) { strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "VacationDetailCreation", VacationDetailID); } //else if (VacationDetail.Vacation.VacationType == VacationsTypesEnum.Normal) // strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "NormalVacation", VacationDetailID, EmployeeName); else { strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "VacationDetailAction", VacationDetailID); } } else if (Type.Equals(BusinessSubCategoriesEnum.Scholarships.ToString())) { ScholarshipsDetailsBLL ScholarshipDetails = new ScholarshipsDetailsBLL().GetScholarshipsDetailsByScholarshipDetailID(int.Parse(ID)); ReportParameter ScholarshipDetailID = new ReportParameter("ScholarshipDetailID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "ScholarshipByScholarshipDetailID", ScholarshipDetailID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.VacationsByEndOfService.ToString())) { string TotalAvailableVacationBalance = "", TotalConsumedBalance = "", TotalRemainingBalance = "", TotalRemainingAvailableVacationBalance = ""; GetVacationBalances(ID, out TotalAvailableVacationBalance, out TotalConsumedBalance, out TotalRemainingBalance, out TotalRemainingAvailableVacationBalance); ReportParameter EndOfServiceID = new ReportParameter("EndOfServiceID", ID); ReportParameter PRTotalAvailableVacationBalance = new ReportParameter("TotalAvailableVacationBalance", TotalAvailableVacationBalance); ReportParameter PRTotalConsumedBalance = new ReportParameter("TotalConsumedBalance", TotalConsumedBalance); ReportParameter PRTotalRemainingBalance = new ReportParameter("TotalRemainingBalance", TotalRemainingBalance); ReportParameter PRTotalRemainingAvailableVacationBalance = new ReportParameter("TotalRemainingAvailableVacationBalance", TotalRemainingAvailableVacationBalance); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "NormalVacationsByEOS", EndOfServiceID, PRTotalAvailableVacationBalance, PRTotalConsumedBalance, PRTotalRemainingBalance, PRTotalRemainingAvailableVacationBalance); } else if (Type.Equals(BusinessSubCategoriesEnum.EmployeeCareerHistoryByEndOfService.ToString())) { ReportParameter EndOfServiceID = new ReportParameter("EndOfServiceID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "EmployeeCareerHistoryByEOS", EndOfServiceID); } else if (Type.Equals(BusinessSubCategoriesEnum.StopWork.ToString())) { ReportParameter StopWorkID = new ReportParameter("StopWorkID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "StopWork", StopWorkID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.InsteadDeportations.ToString())) { ReportParameter InsteadDeportationID = new ReportParameter("InsteadDeportationID", ID); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "InsteadDeportation", InsteadDeportationID, EmployeeName); } else if (Type.Equals(BusinessSubCategoriesEnum.ChangeLogs.ToString())) { ReportParameter EmployeeCodeID = new ReportParameter("EmployeeCodeID", ID); ReportParameter BusinssSubCategoryID = new ReportParameter("BusinssSubCategoryID", Request.QueryString["BusinssSubCategoryID"].ToString()); ReportParameter StartDate = new ReportParameter("StartDate", Globals.Calendar.UmAlquraToGreg(Request.QueryString["StartDate"].ToString())); ReportParameter EndDate = new ReportParameter("EndDate", Globals.Calendar.UmAlquraToGreg(Request.QueryString["EndDate"].ToString())); strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "ChangeLogs", EmployeeCodeID, BusinssSubCategoryID, StartDate, EndDate); } //else if (Type.Equals(BusinessSubCategoriesEnum.SickVacationsPaidAmount.ToString())) //{ // strFileName = RSM.ReportCalling(ReportViewerControl.RViewer, "SickVacationsPaidAmount"); //} if (!string.IsNullOrEmpty(strFileName)) { Response.Redirect(strFileName, false); } } } catch (Exception ex) { Response.Write(ex.Message); } }