/// <summary> /// Forward the specified File to a particular Role in a Office /// </summary> /// <param name="FileId">Id of the file that has to be forwarded</param> /// <param name="Designation">Designation to whom the file has to be forwarded</param> /// <param name="OfficeId">Id of the Office where the file has to be forwarded</param> public static void ForwardFile(Guid FileId, Guid Designation, Guid OfficeId, Guid OriginalAlertId) { string curUser = Thread.CurrentPrincipal.Identity.Name; string link = ""; string Department = ""; Dictionary <string, object> InfoList = new Dictionary <string, object>(); string FileNumber = GetFileNo(FileId); if (FileNumber != "") { Department = FileNumber.Substring(0, 3); } switch (Department) { case "LIC": link = "~/License/LicenseApplication.aspx?Mode=View"; break; case "APL": link = "~/Appeal/AppealApplication.aspx?Mode=ReadOnly"; break; case "COM": link = "~/Complain/Complaint.aspx?Mode=ReadOnly"; break; case "REF": link = "~/Refund/RefundApplication.aspx?Mode=ReadOnly"; break; case "ADJ": //InfoList.Add(ValuationFormId, FileId); link = "~/Adjudication/AdjApplication.aspx?Mode=ReadOnly"; break; } InfoList.Add("FileId", FileId); string Message = "A File has been forwarded by:" + curUser; try { StringBuilder FwdUsers = new StringBuilder(); Guid GroupId = Guid.NewGuid(); foreach (string AlertUser in WorkflowSupport.GetUserAtOfficeRole(OfficeId, Designation)) { WorkflowSupport.SendAlert(curUser, AlertUser, link, Message, InfoList, GroupId); FwdUsers.Append(AlertUser + ", "); } string forwardedTo = FwdUsers.ToString().Remove(FwdUsers.ToString().Length - 2); IgrssAdapters.FileForwardingAdapter.AddFileForwardDetails(FileId, curUser, forwardedTo, DateTime.Now, OriginalAlertId); WorkflowSupport.DisableAlert(OriginalAlertId); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } } }
protected void fvVendorDetails_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "ApproveVendorLicense") { Guid licID = new Guid(fldApplicationId.Value); string LicenseNo = ((TextBox)fvVendorDetails.FindControl("txtLicNo")).Text; string IssueDate = ((TextBox)fvVendorDetails.FindControl("txtIssueDate")).Text; string EffectiveDate = ((TextBox)fvVendorDetails.FindControl("txtEffectiveDate")).Text; string ExpiryDate = ((TextBox)fvVendorDetails.FindControl("txtExpiryDate")).Text; Guid AlertId = (Guid)ViewState["AlertId"]; objLicApproved.ApprovedVendorLicense(licID, LicenseNo, Convert.ToDateTime(IssueDate), Convert.ToDateTime(EffectiveDate), Convert.ToDateTime(ExpiryDate), AlertId); mvLicApprove.SetActiveView(mvLicApprove.Views[0]); txtApplicationNo.Text = ""; Dictionary <string, string> reportParams = new Dictionary <string, string>(); string ApplnNo = ((TextBox)fvVendorDetails.FindControl("ApplnNumberTextBox")).Text; reportParams.Add("ApplnNumber", ApplnNo); Session["ReportParams"] = reportParams; Session["ReportName"] = "LicenseApplicationAcknowledgement"; Response.Redirect("~/Report/Report.aspx"); } if (e.CommandName == "RejectVendorLicense") { //Guid licID = new Guid(grdVen_Dtl.SelectedDataKey.Value.ToString()); Guid licID = new Guid(fldApplicationId.Value); objLicApproved.RejectVenorLicense(licID); mvLicApprove.SetActiveView(mvLicApprove.Views[0]); txtApplicationNo.Text = ""; WorkflowSupport.DeleteAlert(new Guid(ViewState["AlertId"].ToString())); ((IGRSS_Default)this.Master).ShowStatusMessage("Application Rejected", "The Application has been rejeced", MessageType.Success); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { FileManagement_FileForward ff = (FileManagement_FileForward)fvVendorDetails.FindControl("FileForward1"); if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldLicenseId.Value = alert.SessionData["FileId"].ToString(); ff.FileId = new Guid(fldLicenseId.Value); } switch (Request.Params["Mode"]) { case "DataEntry": mvLicApp.SetActiveView(mvLicApp.Views[1]); fvVendorDetails.ChangeMode(FormViewMode.Insert); //ff.SetPermissions(true, false, false); break; case "Verify": mvLicApp.SetActiveView(mvLicApp.Views[1]); fvVendorDetails.ChangeMode(FormViewMode.Edit); //ff.SetPermissions(true, false, true); break; case "ReadOnly": mvLicApp.SetActiveView(mvLicApp.Views[0]); fvVendorDetails.ChangeMode(FormViewMode.ReadOnly); //ff.SetPermissions(false, false, true); break; } } }
private void OnApplicationUpdated_Invoked(object sender, ExternalDataEventArgs e) { FeedbackData CurFeedback = VerificationList[verificationIndex]; WorkflowSupport.DeleteAlerts(CurFeedback.Alerts.ToArray()); this.verificationIndex = 0; }
protected void fvAppeal_ItemCommand(object sender, FormViewCommandEventArgs e) { //Checking the Command Name and Calling the Method of the BLL. if (e.CommandName == "ApproveAppealApplication") { //Getting the selected DataKey of the GridView into Variable. Guid AppealId = new Guid(fldAppealApplicationId.Value.ToString()); //Calling the Method of the BLL. objAppeal.ApproveAppealApplication(AppealId, (Guid)ViewState["AlertId"]); ((IGRSS_Default)this.Master).ShowStatusMessage(Status_Messages.SaveSucess, Status_Messages.SaveSucessDescription, MessageType.Success); //((IGRSS_Default)this.Master).ShowStatusMessage("Application Approved", "The Application has been Approved", MessageType.Success); Response.Redirect("~/Default.aspx"); } if (e.CommandName == "RejectAppealApplication") { //Getting the selected DataKey of the GridView. Guid licID = new Guid(fldAppealApplicationId.Value.ToString()); //Calling the Method of the BLL. objAppeal.RejectAppealApplication(licID); WorkflowSupport.DeleteAlert(new Guid(ViewState["AlertId"].ToString())); ((IGRSS_Default)this.Master).ShowStatusMessage("Application Rejected", "The Application has been rejeced", MessageType.Success); Response.Redirect("~/Default.aspx"); } }
private void OnApplicationUpdated_Invoked(object sender, ExternalDataEventArgs e) { ApplicationUpdatedEventArgs args = (ApplicationUpdatedEventArgs)e; LicenseApplicationRow row = args.UpdatedLicenseRows[0]; IgrssAdapters.LAppTableAdapter.UpdateVendorDetails(row.ApplnNumber, row.NameOfApplicant, row.PresentAddress, row.PermanentAddress, row.DateOfBirth, DateTime.Now, row.Qualification, row.Experience, row.Caste, row.BusinessAddress, row.TotalInvestmentAmount, row.NameAndAddressOfReferer, row.SubmissionOfficeId, row.HomePhone, row.Remarks, row.HoldingAnyOtherLicense, row.PurposeOfLicense, this.LicenseId); FeedbackData CurFeedback = VerificationList[verificationIndex]; WorkflowSupport.DeleteAlerts(CurFeedback.Alerts.ToArray()); this.verificationIndex = 0; }
protected void Page_Load(object sender, EventArgs e) { if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldApplicationId.Value = alert.SessionData["FileId"].ToString(); ViewState["AlertId"] = alert.AlertId; } mvLicApprove.SetActiveView(mvLicApprove.Views[1]); fvVendorDetails.ChangeMode(FormViewMode.ReadOnly); }
private void OnApproved_Invoked(object sender, ExternalDataEventArgs e) { FeedbackEventArgs args = (FeedbackEventArgs)e; FeedbackData CurFeedback = ApprovalList[approvalIndex]; if (!CurFeedback.Alerts.Contains(args.AlertId)) { throw new Exception("Alert " + args.AlertId + " is not expected at this state of Workflow"); } WorkflowSupport.DeleteAlerts(CurFeedback.Alerts.ToArray()); this.approvalIndex++; }
protected void FvAssignOfficer_ItemCommand(object sender, FormViewCommandEventArgs e) { if (e.CommandName == "AssignOfficer") { Complain cmp = new Complain(); DropDownList ddlOffice = (DropDownList)FvAssignOfficer.FindControl("ddlOfficeName"); DropDownList ddlDesig = (DropDownList)FvAssignOfficer.FindControl("ddlDesigination"); string[] officer = WorkflowSupport.GetUserAtOfficeRole(new Guid(ddlOffice.SelectedValue), new Guid(ddlDesig.SelectedValue)); cmp.AssignEnquiryOfficer(officer[0], new Guid(fldComplainId.Value)); Response.Redirect("~/"); } }
private void OnApproved_Invoked(object sender, ExternalDataEventArgs e) { string curUser = Thread.CurrentPrincipal.Identity.Name; IgrssAdapters.AppealAdapter.ApproveAppealApplication(this.AppealId, curUser, DateTime.Now); FeedbackEventArgs args = (FeedbackEventArgs)e; FeedbackData CurFeedback = ApprovalList[approvalIndex]; if (!CurFeedback.Alerts.Contains(args.AlertId)) { throw new Exception("Alert " + args.AlertId + " is not expected at this state of Workflow"); } WorkflowSupport.DeleteAlerts(CurFeedback.Alerts.ToArray()); this.approvalIndex++; }
private void OnReAssignInvestigation_Invoked(object sender, ExternalDataEventArgs e) { InvestigationRequiredEventArgs args = (InvestigationRequiredEventArgs)e; Guid EmployeeId = (Guid)IgrssAdapters.EmployeeMaster.GetEmployeeIdByUsername(args.InvestigatingOfficer); IgrssAdapters.ComplainAdapter.AssignEnquiryOfficer(EmployeeId, DateTime.Now, ComplainId); string curUser = Thread.CurrentPrincipal.Identity.Name; string link = WorkflowLinks.Default.ComplainInvestigationResult; Dictionary <string, object> InfoList = new Dictionary <string, object>(); InfoList.Add("FileId", ComplainId); Guid GroupId = Guid.NewGuid(); WorkflowSupport.SendAlert(curUser, args.InvestigatingOfficer, link, "Complain Investigation Required!", InfoList, GroupId); }
private void OnFileClosed_Invoked(object sender, ExternalDataEventArgs e) { string curUser = Thread.CurrentPrincipal.Identity.Name; // Complain File has been closed alert the Officer who accepted the Complain FeedbackData CurFeedback = AcceptanceList[0]; Guid OfficeId = CurFeedback.ForwardingOffice; Guid RoleId = CurFeedback.Role; // new Guid("9c83ade7-74ce-448e-b57c-3f6c5a4a5569"); string link = WorkflowLinks.Default.ComplainInvestigationResult; Dictionary <string, object> InfoList = new Dictionary <string, object>(); InfoList.Add("FileId", ComplainId); Guid GroupId = Guid.NewGuid(); foreach (string AlertUser in WorkflowSupport.GetUserAtOfficeRole(OfficeId, RoleId)) { CurFeedback.Alerts.Add(WorkflowSupport.SendAlert(curUser, AlertUser, link, "Complain Investigation Complete...", InfoList, GroupId)); } }
protected void Page_Load(object sender, EventArgs e) { //Getting the current Mode of the formView. if (FvAssignOfficer.CurrentMode == FormViewMode.ReadOnly) { //Creating the Instance of the IgrssGlobalConfigTableAdapter Object IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter(); //Calling the BLL method and Storing result into XmlDataSource XmlComplainType.Data = (string)ConfigAdapter.GetConfigByModule("COM", "CompType"); //Binding the XmlDataSource XmlComplainType.DataBind(); } if (Request.Params["AlertId"] != null) { IgrssAlert Alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldComplainId.Value = Alert.SessionData["FileId"].ToString(); } }
private void ApprovalAlert_ExecuteCode(object sender, System.EventArgs e) { string curUser = Thread.CurrentPrincipal.Identity.Name; FeedbackData CurFeedback = ApprovalList[approvalIndex]; Guid OfficeId = CurFeedback.ForwardingOffice; Guid RoleId = CurFeedback.Role; // new Guid("9c83ade7-74ce-448e-b57c-3f6c5a4a5569"); string link = WorkflowLinks.Default.RefundApproval; Dictionary <string, object> InfoList = new Dictionary <string, object>(); InfoList.Add("FileId", RefundId); FileManagement flmgmt = new FileManagement(); string FileNumber = flmgmt.GetFileNumberByFileId(RefundId); Guid GroupId = Guid.NewGuid(); foreach (string AlertUser in WorkflowSupport.GetUserAtOfficeRole(OfficeId, RoleId)) { CurFeedback.Alerts.Add(WorkflowSupport.SendAlert(curUser, AlertUser, link, "Refund Approval Pending for: " + FileNumber, InfoList, GroupId)); } }
protected void Page_Load(object sender, EventArgs e) { if (Page.IsPostBack == false) { if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); ViewState["AlertId"] = alert.AlertId; fldComplainId.Value = alert.SessionData["FileId"].ToString(); mvAssignOfficer.SetActiveView(mvAssignOfficer.Views[1]); } } if (FvInvestigationdetail.CurrentMode == FormViewMode.ReadOnly) { IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter(); XmlComplainType.Data = (string)ConfigAdapter.GetConfigByModule("COM", "CompType"); XmlComplainType.DataBind(); } }
static void SendAlert() { Guid OfficeId = new Guid("c53112ee-5868-43aa-bcf5-52454f589daa"); Guid RoleId = new Guid("7c83e591-a861-4b4f-bd1d-12f99cc32123"); string[] usersToAlert = WorkflowSupport.GetUserAtOfficeRole(OfficeId, RoleId); Dictionary <string, object> InfoList = new Dictionary <string, object>(); InfoList.Add("item1", Guid.NewGuid()); InfoList.Add("item2", Convert.ToInt32("568")); XmlDocument doc = new XmlDocument(); doc = WorkflowSupport.SerilizeDictionary(InfoList); foreach (string user in usersToAlert) { WorkflowSupport.SendAlert("admin", user, "link", "Test Message", doc); } Dictionary <string, object> AlertsInfo = new Dictionary <string, object>(); AlertsInfo = WorkflowSupport.DeSerilizeDictionary(doc); }
private void OnInvestigationRequired_Invoked(object sender, ExternalDataEventArgs e) { FeedbackData CurFeedback = AcceptanceList[0]; InvestigationRequiredEventArgs args = (InvestigationRequiredEventArgs)e; Guid EmployeeId = (Guid)IgrssAdapters.EmployeeMaster.GetEmployeeIdByUsername(args.InvestigatingOfficer); IgrssAdapters.ComplainAdapter.AssignEnquiryOfficer(EmployeeId, DateTime.Now, ComplainId); string curUser = Thread.CurrentPrincipal.Identity.Name; string link = WorkflowLinks.Default.ComplainInvestigationResult; Dictionary <string, object> InfoList = new Dictionary <string, object>(); InfoList.Add("FileId", ComplainId); FileManagement flmgmt = new FileManagement(); string FileNumber = flmgmt.GetFileNumberByFileId(ComplainId); Guid GroupId = Guid.NewGuid(); WorkflowSupport.SendAlert(curUser, args.InvestigatingOfficer, link, "Complain Investigation Required for: " + FileNumber, InfoList, GroupId); WorkflowSupport.DeleteAlerts(CurFeedback.Alerts.ToArray()); }
private void OnInvestigationDone_Invoked(object sender, ExternalDataEventArgs e) { string curUser = Thread.CurrentPrincipal.Identity.Name; InvestigationDoneEventArgs args = (InvestigationDoneEventArgs)e; IgrssAdapters.InvestigationAdapter.AddInvestigationDetail(Guid.NewGuid(), ComplainId, args.InvestigationDate, args.InvestigationDetails, curUser, DateTime.Now); // Investigation is Completed so alert the Officer who assigned the Investigation FeedbackData CurFeedback = AcceptanceList[0]; Guid OfficeId = CurFeedback.ForwardingOffice; Guid RoleId = CurFeedback.Role; // new Guid("9c83ade7-74ce-448e-b57c-3f6c5a4a5569"); string link = WorkflowLinks.Default.ComplainInvestigationResult; Dictionary <string, object> InfoList = new Dictionary <string, object>(); InfoList.Add("FileId", ComplainId); Guid GroupId = Guid.NewGuid(); foreach (string AlertUser in WorkflowSupport.GetUserAtOfficeRole(OfficeId, RoleId)) { CurFeedback.Alerts.Add(WorkflowSupport.SendAlert(curUser, AlertUser, link, "Complain Investigation Complete...", InfoList, GroupId)); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.Params["AlertId"] != null) { IgrssAlert Alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldComplainId.Value = Alert.SessionData["FileId"].ToString(); } if (Request.Params["RedirID"] != null) { fldComplainId.Value = Request.Params["RedirID"].ToString(); mvComplain.SetActiveView(mvComplain.Views[2]); fvReadonly.ChangeMode(FormViewMode.ReadOnly); } switch (Request.Params["Mode"]) { case "DataEntry": mvComplain.SetActiveView(mvComplain.Views[1]); fvcomplain.ChangeMode(FormViewMode.Insert); break; case "Verify": mvComplain.SetActiveView(mvComplain.Views[0]); fvcomplain.ChangeMode(FormViewMode.Edit); break; } if (fvcomplain.CurrentMode == FormViewMode.Insert) { IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter(); XmlComplainType.Data = (string)ConfigAdapter.GetConfigByModule("COM", "CompType"); XmlComplainType.DataBind(); } if (fvcomplain.CurrentMode == FormViewMode.Edit) { IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter(); XmlComplainType.Data = (string)ConfigAdapter.GetConfigByModule("COM", "CompType"); XmlComplainType.DataBind(); } }
private void VerificationAlert_ExecuteCode(object sender, System.EventArgs e) { string link = ""; string curUser = Thread.CurrentPrincipal.Identity.Name; FeedbackData CurFeedback = VerificationList[verificationIndex]; Guid OfficeId = CurFeedback.ForwardingOffice; Guid RoleId = CurFeedback.Role; // new Guid("9c83ade7-74ce-448e-b57c-3f6c5a4a5569"); bool IsFranking = FileManager.GetLicenseType(LicenseId); if (IsFranking == true) { link = WorkflowLinks.Default.FrankingMachineVerification; } else { link = WorkflowLinks.Default.LicenseVerification; } Dictionary <string, object> InfoList = new Dictionary <string, object>(); InfoList.Add("FileId", LicenseId); FileManagement flmgmt = new FileManagement(); string FileNumber = flmgmt.GetFileNumberByFileId(LicenseId); Guid GroupId = Guid.NewGuid(); foreach (string AlertUser in WorkflowSupport.GetUserAtOfficeRole(OfficeId, RoleId)) { if (IsFranking == true) { CurFeedback.Alerts.Add(WorkflowSupport.SendAlert(curUser, AlertUser, link, "Franking License Verification Pending for: " + FileNumber, InfoList, GroupId)); } else { CurFeedback.Alerts.Add(WorkflowSupport.SendAlert(curUser, AlertUser, link, "License Verification Pending for: " + FileNumber, InfoList, GroupId)); } } }
private void OnApplicationUpdated_Invoked(object sender, ExternalDataEventArgs e) { // Type cast the event args to the required type RefundApplicationUpdatedEventArgs args = (RefundApplicationUpdatedEventArgs)e; // Retrive the row to be updated (always the frist row i.e. Rows[0]) RefundApplicationRow row = args.UpdatedRefundRows[0]; //using (TransactionScope scope = new TransactionScope()) { // Update the database row IgrssAdapters.RefundApplicationAdapter.UpdateRefundApplication1(this.RefundId, 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, row.Remarks, row.ActualStampValue); // Delete all the existing StampDetails for this Refund Application IgrssAdapters.RefundStampDetailsAdapter.DeleteRefundStampDetails(this.RefundId); // Re-Enter the Stamp Details foreach (DataRow StampDetail in args.StampDetails.Rows) { IgrssAdapters.RefundStampDetailsAdapter.InsertStampDetails(this.RefundId, (Guid)StampDetail["RevenueStampId"], (string)StampDetail["ReturnedQty"], (string)StampDetail["StampNumber"]); } // Delete all the existing Acts that were selected for this Refund Application IgrssAdapters.RefundActsApplicable.DeleteRefundOrders(this.RefundId); // Re-Enter the Acts that have been selected foreach (DataRow Act in args.ActsApplicable.Rows) { IgrssAdapters.RefundActsApplicable.InsertRefundActsApplicable(this.RefundId, (Guid)Act["ActId"], (bool)Act["Checked"], ""); } //scope.Complete(); } // The Application has been modified and will require verification from all again FeedbackData CurFeedback = VerificationList[verificationIndex]; WorkflowSupport.DeleteAlerts(CurFeedback.Alerts.ToArray()); this.verificationIndex = 0; }
public static bool ReturnFile(Guid FileId) { string curUser = Thread.CurrentPrincipal.Identity.Name; string message = "File has been returned to you"; int fileForwardLevel = Convert.ToInt32(IgrssAdapters.FileForwardingAdapter.GetFileForwardLevel(FileId)); try { FileForwardTable ForwardDetail = IgrssAdapters.FileForwardingAdapter.GetFileForwardDetailsByLevel(FileId, fileForwardLevel); if (ForwardDetail.Rows.Count > 0) { FileForwardsRow row = ForwardDetail[0]; IgrssAlert Alert = WorkflowSupport.GetAlertById(row.FordwardedAlertId); if (fileForwardLevel > 1) { Guid GroupId = Guid.NewGuid(); WorkflowSupport.SendAlert(curUser, Alert.SentBy, Alert.Link, message, Alert.SessionData, GroupId); } else if (fileForwardLevel == 1) { WorkflowSupport.EnableAlert(Alert.AlertId); } WorkflowSupport.DeleteAlert(Alert.AlertId); IgrssAdapters.FileForwardingAdapter.SetFileReturned(FileId, fileForwardLevel); } return(true); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, "DAL")) { throw; } } return(false); }
protected void ddlAction_SelectedIndexChanged(object sender, EventArgs e) { if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); this.FileId = new Guid(alert.SessionData["FileId"].ToString()); } if (ddlAction.SelectedIndex == 0) { mvFileManagement.Visible = false; if (this.CanAddRemark == true) { mvFileManagement.Visible = false; } else { } } if (ddlAction.SelectedIndex == 1) { if (CanForwardFile == true || CanForwardFile == false) { mvFileManagement.Visible = true; mvFileManagement.SetActiveView(ViewFileForward); } else { mvFileManagement.Visible = true; mvFileManagement.SetActiveView(ViewError); } } if (ddlAction.SelectedIndex == 2) { if (CanAddRemark == true || CanAddRemark == false) { mvFileManagement.Visible = true; mvFileManagement.SetActiveView(ViewInsertRemark); fvFileManagement.ChangeMode(FormViewMode.Insert); } else { mvFileManagement.Visible = true; mvFileManagement.SetActiveView(ViewError); } } if (ddlAction.SelectedIndex == 3) { if (CanAddRemark == true || CanAddRemark == false) { mvFileManagement.Visible = true; mvFileManagement.SetActiveView(ViewRemark); fvFileManagement.ChangeMode(FormViewMode.Edit); } else { mvFileManagement.Visible = true; mvFileManagement.SetActiveView(ViewError); } } }
protected void Page_Load(object sender, EventArgs e) { FileManagement_FileForward ffc = (FileManagement_FileForward)fvAppeal.FindControl("FileForward1"); if (Page.IsPostBack == false) { if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); ViewState["AlertId"] = alert.AlertId; fldAppealApplicationId.Value = alert.SessionData["FileId"].ToString(); ffc.FileId = new Guid(fldAppealApplicationId.Value); } if (Request.Params["RedirID"] != null) { fldAppealApplicationId.Value = Request.Params["RedirID"].ToString(); mvAppealType.SetActiveView(mvAppealType.Views[2]); fvReadOnly.ChangeMode(FormViewMode.ReadOnly); ((Label)fvReadOnly.FindControl("lblFileNo")).Text = FileManager.GetFileNo(new Guid(fldAppealApplicationId.Value)); } switch (Request.Params["Mode"]) { case "DataEntry": mvAppealType.SetActiveView(mvAppealType.Views[1]); fvAppeal.ChangeMode(FormViewMode.Insert); break; case "Verify": mvAppealType.SetActiveView(mvAppealType.Views[1]); fvAppeal.ChangeMode(FormViewMode.Edit); //((Label)fvAppeal.FindControl("lblaplFileNo")).Text = FileManager.GetFileNo(new Guid(fldAppealApplicationId.Value)); break; case "Approve": mvAppealType.SetActiveView(mvAppealType.Views[1]); fvAppeal.ChangeMode(FormViewMode.ReadOnly); //((Label)fvAppeal.FindControl("lblFileNoRO")).Text = FileManager.GetFileNo(new Guid(fldAppealApplicationId.Value)); break; case "ReadOnly": mvAppealType.SetActiveView(mvAppealType.Views[2]); break; } Session["Mode"] = Request.Params["Mode"]; } if (Request.Params["AlertId"] != null) { //if (Request.Params["Mode"].ToString() == "Approve") //{ // FileManagement_FileForward ffc3 = (FileManagement_FileForward)fvAppeal.FindControl("FileForward3"); // IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); // fldAppealApplicationId.Value = alert.SessionData["AppealId"].ToString(); // ffc3.FileId = new Guid(fldAppealApplicationId.Value); //} //else //{ IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldAppealApplicationId.Value = alert.SessionData["FileId"].ToString(); ffc.FileId = new Guid(fldAppealApplicationId.Value); //} } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldRefundId.Value = alert.SessionData["FileId"].ToString(); fvRefundApplication.ChangeMode(FormViewMode.Edit); FileManagement_FileForward ffc = (FileManagement_FileForward)fvRefundApplication.FindControl("FileForward1"); ffc.FileId = new Guid(fldRefundId.Value); } if (Request.Params["RedirID"] != null) { fldRefundId.Value = Request.Params["RedirID"].ToString(); mvRefund.SetActiveView(mvRefund.Views[2]); FvRefundReadOnly.ChangeMode(FormViewMode.ReadOnly); ((Label)FvRefundReadOnly.FindControl("lblfileNOR")).Text = FileManager.GetFileNo(new Guid(fldRefundId.Value)); } switch (Request.Params["Mode"]) { case "DataEntry": mvRefund.SetActiveView(mvRefund.Views[0]); fvRefundApplication.ChangeMode(FormViewMode.Insert); break; case "Verify": mvRefund.SetActiveView(mvRefund.Views[0]); fvRefundApplication.ChangeMode(FormViewMode.Edit); break; case "Approve": mvRefund.SetActiveView(mvRefund.Views[0]); fvRefundApplication.ChangeMode(FormViewMode.ReadOnly); break; case "ReadOnly": mvRefund.SetActiveView(mvRefund.Views[2]); ((Label)fvRefundApplication.FindControl("lblfileNOR")).Text = FileManager.GetFileNo(new Guid(fldRefundId.Value)); break; } } if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldRefundId.Value = alert.SessionData["FileId"].ToString(); //fvRefundApplication.ChangeMode(FormViewMode.Edit); FileManagement_FileForward ffc = (FileManagement_FileForward)fvRefundApplication.FindControl("FileForward1"); if (ffc != null) { ffc.FileId = new Guid(fldRefundId.Value); } } //Session["Mode"] = Request.Params["Mode"]; if (fvRefundApplication.CurrentMode == FormViewMode.Insert) { IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter(); XmlRefundType.Data = (string)ConfigAdapter.GetConfigByModule("REF", "RefType"); XmlRefundType.DataBind(); } if (fvRefundApplication.CurrentMode == FormViewMode.Edit) { IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter(); XmlRefundType.Data = (string)ConfigAdapter.GetConfigByModule("REF", "RefType"); XmlRefundType.DataBind(); } //DropDownList dlOfficeName = (DropDownList) fvRefundApplication.FindControl("dlOfficeName"); //Profile.Permissions.FillOffices(dlOfficeName, "REF", "Insert"); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.Params["AlertId"] != null) { IgrssAlert alert = WorkflowSupport.GetAlertById(new Guid(Request.Params["AlertId"])); fldValId.Value = alert.SessionData["ValuationFormId"].ToString(); fldAdjId.Value = alert.SessionData["FileId"].ToString(); } if (Request.Params["RedirID"] != null) { fldAdjId.Value = Request.Params["RedirID"].ToString(); mvAdjRequest.SetActiveView(mvAdjRequest.Views[2]); fvReadOnly.ChangeMode(FormViewMode.ReadOnly); } switch (Request.Params["Mode"]) { case "DataEntry": mvAdjRequest.SetActiveView(mvAdjRequest.Views[1]); fvValuationForm.ChangeMode(FormViewMode.Insert); break; case "Verify": mvAdjRequest.SetActiveView(mvAdjRequest.Views[1]); FvAdjudicationRequest.ChangeMode(FormViewMode.Edit); fvValuationForm.ChangeMode(FormViewMode.Edit); break; case "Readonly": mvAdjRequest.SetActiveView(mvAdjRequest.Views[0]); break; } } Session["Mode"] = Request.Params["Mode"]; if (fvValuationForm.CurrentMode == FormViewMode.Insert) { xdsCompoundWall.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "ElectType"); xdsCompoundWall.DataBind(); xdsPropertyType.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "PROPERTYT"); xdsPropertyType.DataBind(); xdsElectricalElectrification.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "WallType"); xdsElectricalElectrification.DataBind(); } if (fvValuationForm.CurrentMode == FormViewMode.Edit) { xdsCompoundWall.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "ElectType"); xdsCompoundWall.DataBind(); xdsPropertyType.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "PROPERTYT"); xdsPropertyType.DataBind(); xdsElectricalElectrification.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "WallType"); xdsElectricalElectrification.DataBind(); } if (fvReadOnly.CurrentMode == FormViewMode.ReadOnly) { xdsCompoundWall.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "ElectType"); xdsCompoundWall.DataBind(); xdsPropertyType.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "PROPERTYT"); xdsPropertyType.DataBind(); xdsElectricalElectrification.Data = (string)ConfigAdapter.GetConfigByModule("ADJ", "WallType"); xdsElectricalElectrification.DataBind(); } }