public bool NewFrankingApplication(FormViewParameter Parameter, Remarks rem) { LicenseAppRow rowLic = (LicenseAppRow)Parameter.Values; try { Guid LicenseId = FileManager.OpenNewFile(rowLic.SubmissionOfficeId, "LIC"); if ((rem.Body != "") || (rem.Subject != "")) { FileManager.AddRemarkToFile(LicenseId, rem.Subject, rem.Body); } string UserName = Thread.CurrentPrincipal.Identity.Name; //IGRSS.DataAccessLayer.Complain.ComplainDatatableRow row = (IGRSS.DataAccessLayer.Complain.ComplainDatatableRow) parameter.Values; IGRSS.DataAccessLayer.LicenseApplication.LicenseApplicationRow row = (IGRSS.DataAccessLayer.LicenseApplication.LicenseApplicationRow)Parameter.Values; IgrssAdapters.LAppTableAdapter.AddFrankingMachineDetails(LicenseId, row.ApplnNumber, row.NameOfApplicant, row.PresentAddress, row.PermanentAddress, DateTime.Now, row.Qualification, row.Experience, row.BusinessAddress, row.TotalInvestmentAmount, row.NameAndAddressOfReferer, row.SubmissionOfficeId, row.HomePhone, row.HoldingAnyOtherLicense, row.PurposeOfLicense); Dictionary <string, object> WfParams = new Dictionary <string, object>(); WfParams.Add("LicenseId", LicenseId); WfParams.Add("InitiatingOffice", row.SubmissionOfficeId); WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(LicenseIssueProcess), WfParams); return(true); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } return(false); } }
/// <summary> /// Inserting the new RefundApplication /// </summary> /// <param name="Parameter"> formview parameter</param> /// <param name="StampDetails">stamps added by the user in the form of Datatable </param> /// <param name="ActsApplicable">Acts added by the user</param> /// <returns>true, a record is inserted</returns> public bool AddNewRefundApplication(FormViewParameter Parameter, DataTable StampDetails, DataTable ActsApplicable, Remarks rem) { // Initiate some of the fields required for the process RefundApplicationRow rowRef = (RefundApplicationRow)Parameter.Values; Guid RefundApplicationId = FileManager.OpenNewFile(rowRef.OfficeId, "REF"); FileManager.AddRemarkToFile(RefundApplicationId, rem.Subject, rem.Body); string curUser = Thread.CurrentPrincipal.Identity.Name; RefundApplicationRow row = (IGRSS.DataAccessLayer.Refund.RefundApplicationRow)Parameter.Values; try { TimeSpan ts = new TimeSpan(row.PurchasedDate.Ticks - row.ApplicationDate.Ticks); string DayDifference = ts.TotalDays.ToString(); // Insert the Refiund Application data to database decimal TotalValueOfStamps = Convert.ToDecimal(row.TotalValueOfStamps); decimal pActualStampValue = 10 * TotalValueOfStamps / 100; decimal ActualStampValue = TotalValueOfStamps - pActualStampValue; IgrssAdapters.RefundApplicationAdapter.NewRefundApplication(RefundApplicationId, row.OfficeId, row.RegistrationNo, row.TypeOfRefund, row.ApplicationDate, row.VendorLicenseId, row.PurchasedDate, row.TotalValueOfStamps, row.ReasonForNotUsing, row.ApplicantName, row.ApplicantAddress, row.City, row.District, row.PinCode, row.PhoneNo.ToString(), DateTime.Now, curUser, ActualStampValue); // For each Stamp Detail entered by user // Insert the Stamp Details for this Refund in to child table foreach (DataRow StampDetail in StampDetails.Rows) { IgrssAdapters.RefundStampDetailsAdapter.InsertStampDetails(RefundApplicationId, (Guid)StampDetail["RevenueStampId"], (string)StampDetail["ReturnedQty"], (string)StampDetail["StampNumber"]); } // For each Act selected by the user // Insert the Applicable Acts to child table foreach (DataRow Act in ActsApplicable.Rows) { IgrssAdapters.RefundActsApplicable.InsertRefundActsApplicable(RefundApplicationId, (Guid)Act["ActId"], (bool)Act["Checked"], ""); } // All database Inserts have been completed sucessfully initiate the Workflow // Create a Dioctionary to store Workflow Paramaters for Refund Dictionary <string, object> WfParams = new Dictionary <string, object>(); // Add Refund Application Id into the Workflow Parameter WfParams.Add("RefundId", RefundApplicationId); // Add Office Id in to Workflow Parameter // (to identify the process flow for the Office) WfParams.Add("InitiatingOffice", row.OfficeId); // Initiate the Refund Workflow by passing the Wf Parameters Dictionary WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(RefundProcess), WfParams); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } } return(true); }
public bool AddAppealAplication(FormViewParameter parameter, DataTable dtAct, Remarks rem) { //Initiate some of the fields required for the process AppealApplicationRow rowApl = (AppealApplicationRow)parameter.Values; Guid AppealId = FileManager.OpenNewFile(rowApl.OfficeId, "APL"); FileManager.AddRemarkToFile(AppealId, rem.Subject, rem.Body); string curUser = Thread.CurrentPrincipal.Identity.Name; int i = 0; try { IGRSS.DataAccessLayer.Appeal.AppealApplicationRow row = (AppealApplicationRow)parameter.Values; i = IgrssAdapters.AppealAdapter.AddAppealApplication(AppealId, row.OfficeId, row.RegistrationNo, row.ApplicantName, row.Address, row.TypeOfAppeal, row.CalculatedAmount, row.DepositAmount, row.FeeReceiptNo, row.Amount, row.InwardDate, row.IsPaidAppealFee, row.AppealInTime, row.PaperFromTo, row.CourtFeeTicket, curUser, DateTime.Now, row.DocumentNo, row.OriginalSRO, row.DocumentDate, row.DaTeOffOrderFromCollector, row.DficitAmount, row.ReceiptNo, row.ReceiptDate); if (i > 0) { foreach (DataRow dr in dtAct.Rows) { IgrssAdapters.AppealActAdapter.AddAppealAct(AppealId, (Guid)dr["ActId"], (bool)dr["Checked"]); } // All database Inserts have been completed sucessfully initiate the Workflow // Create a Dioctionary to store Workflow Paramaters for Appeal Dictionary <string, object> WfParams = new Dictionary <string, object>(); // Add Refund Application Id into the Workflow Parameter WfParams.Add("AppealId", AppealId); // Add Office Id in to Workflow Parameter // (to identify the process flow for the Office) WfParams.Add("InitiatingOffice", row.OfficeId); // Initiate the Refund Workflow by passing the Wf Parameters Dictionary WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(AppealProcess), WfParams); return(true); } else { return(false); } } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } return(false); } }
/// <summary> /// This function will add the new Complain. /// </summary> /// <returns>void</returns> public bool AddNewComplain(FormViewParameter Parameter, Remarks rem) //string ComplaintNo, Guid ComplaintType, Guid AgainstEmpID, Guid ComplainingEmpID, string ComplainantName, string ComplainantAddress, DateTime ComplaintDate, Guid ReceivingOfficeId, string Subject, string Detail) { string curUser = Thread.CurrentPrincipal.Identity.Name; int i = 0; ComplainDetailsRow row = (ComplainDetailsRow)Parameter.Values; try { Guid ComplainId = FileManager.OpenNewFile(row.ReceivingOfficeId, "COM"); // Commented By Akhilesh. //if (rem.Subject != "" && rem.Body != "") //{ // FileManager.AddRemarkToFile(ComplainId, rem.Subject, rem.Body); //} int rowsAffected = 0; if (row.ComplaintType == new Guid("85aefd8d-6b7e-4ab8-b124-21b52073f7b3")) { i = IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, row.ReceivingOfficeId, row.Subject, row.Detail, curUser, DateTime.Now, row.Designation, row.CurrentOffice); } if (row.ComplaintType == new Guid("96369687-0450-42fc-ba41-ad35ade13b53")) { i = IgrssAdapters.ComplainAdapter.AddNewComplainDetails(ComplainId, row.ComplaintNo, row.ComplaintType, row.AgainstEmpID, row.ComplainingEmpID, row.ComplainantName, row.ComplainantAddress, row.ComplaintDate, null, row.Subject, row.Detail, curUser, DateTime.Now, row.Designation, null); } if (i > 0) { Dictionary <string, object> WfParams = new Dictionary <string, object>(); WfParams.Add("ComplainId", ComplainId); WfParams.Add("ComplainOffice", row.ReceivingOfficeId); WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(ComplainProcess), WfParams); return(true); } else { return(false); } } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } return(false); } }
/// <summary> /// This function will Renew the vendor License. /// </summary> /// <param name="LicenseApplicationID"></param> /// <param name="RenewApplicationDate"></param> /// <returns>boolean</returns> public bool RenewAppDate(Guid LicenseApplicationID, DateTime RenewApplicationDate) { try { IgrssAdapters.LAppTableAdapter.UpdateRenewAppDate(Guid.NewGuid(), RenewApplicationDate, LicenseApplicationID); Dictionary <string, object> WfParams = new Dictionary <string, object>(); WfParams.Add("LicenseId", LicenseApplicationID); //WfParams.Add("InitiatingOffice", row.SubmissionOfficeId); WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(LicenseIssueProcess), WfParams); return(true); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } return(false); } }
public bool AddAdjudicationRequest(FormViewParameter ValFormParameter, AdjudicationRequestRow AdjReqRow, DataTable FeeDetails, DataTable DocDetails) { string curUser = Thread.CurrentPrincipal.Identity.Name; Guid AdjudicationId = FileManager.OpenNewFile(AdjReqRow.OfficeId, "ADJ");; Guid ValuationFormId = Guid.NewGuid(); ValuationFormRow ValFormrow = (IGRSS.DataAccessLayer.Adjudication.ValuationFormRow)ValFormParameter.Values; IgrssAdapters.ValuationAdapter.AddValuationDetail(ValuationFormId, ValFormrow.OfficeId, ValFormrow.DistrictCode, ValFormrow.TalukaCode, ValFormrow.VillageCode, null, ValFormrow.Village_CityName, ValFormrow.TPSchemeNo, ValFormrow.TPSchemeName, ValFormrow.FinalPlotNo, ValFormrow.CitySurveyNo, ValFormrow.RevenueSurveyNo, ValFormrow.Ward_SubWardNo, ValFormrow.NameOfOwner, ValFormrow.AddressOfOwner, ValFormrow.NameOfClaimingParty, ValFormrow.AddressOfClaimingParty, ValFormrow.AreaOfPlot, ValFormrow.AreaOfConstruction, ValFormrow.YearOfConstruction, ValFormrow.NoOfFloors, ValFormrow.TypeOfProperty, ValFormrow.DescOfProperty, ValFormrow.ShopsOnGroundFloor, ValFormrow.IsPropertyInCommercial, ValFormrow.TypeOfElectricfication, ValFormrow.CompoundWallType, ValFormrow.IsLightsOnCompoundWall, ValFormrow.WaterStorageFacility, ValFormrow.DrainageSystem, ValFormrow.NoOfLifts, ValFormrow.AreaOfEachLift, ValFormrow.InternalRoad, ValFormrow.ValuatedBefore, ValFormrow.HeightOfCeiling, ValFormrow.TypeOfTiles, ValFormrow.WallFurnishing, ValFormrow.NoOfBathrooms, ValFormrow.BathroomTilesHeight, ValFormrow.NoOfToilets, ValFormrow.ToiletTilesHeight, ValFormrow.Parking, curUser, DateTime.Now); IgrssAdapters.AdjudicationAdapter.AddAdjudicationRequest(AdjudicationId, ValuationFormId, null, AdjReqRow.OfficeId, AdjReqRow.ApplicationDate, AdjReqRow.ReceiptNumber, AdjReqRow.AdjudicationTotalFees); foreach (DataRow FeeDetail in FeeDetails.Rows) { IgrssAdapters.AdjudicationFeeAdapter.AddAdjudicationFees(AdjudicationId, (Guid)FeeDetail["FeeId"], Convert.ToDecimal(FeeDetail["Amount"])); } foreach (DataRow DocDetail in DocDetails.Rows) { IgrssAdapters.AdjudicationDocumentAdapter.AddAdjudicationDocument(ValuationFormId, (Guid)DocDetail["DocumentTypeId"], Convert.ToBoolean(DocDetail["Submitted"]), Convert.ToString(DocDetail["DocumentNumber"]), Convert.ToString(DocDetail["Remarks"])); } // All database Inserts have been completed sucessfully initiate the Workflow // Create a Dioctionary to store Workflow Paramaters for Adjudication Dictionary <string, object> WfParams = new Dictionary <string, object>(); // Add Adjudication Application Id into the Workflow Parameter WfParams.Add("AdjudicationId", AdjudicationId); WfParams.Add("ValuationFormId", ValuationFormId); // Add Office Id in to Workflow Parameter // (to identify the process flow for the Office) WfParams.Add("InitiatingOffice", ValFormrow.OfficeId); // Initiate the Refund Workflow by passing the Wf Parameters Dictionary WorkflowResults WfResult = WorkflowMediator.RunWorkflow(typeof(AdjudicationProcess), WfParams); return(true); }