public void UpdateApplication(Guid InstanceId, ApplicationUpdatedEventArgs args)
 {
     if (null != ApplicationUpdated)
     {
         ApplicationUpdated(null, args);
     }
 }
Beispiel #2
0
        /// <summary>
        /// This function will update the vendor record
        /// </summary>
        /// <param name="Parameter">Contains all the fields of the formview</param>
        /// <returns>boolean</returns>
        public bool updateVendorsDetail(FormViewParameter Parameter, bool Verified, Guid AlertId, Guid LicenseApplicationId, Remarks rem)
        {
            string curUser = Thread.CurrentPrincipal.Identity.Name;
            try
            {
                if ((rem.Body != "") || (rem.Subject != ""))
                {
                    FileManager.AddRemarkToFile(LicenseApplicationId, rem.Subject, rem.Body);
                }
                //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,LicenseApplicationId);
                Guid InstanceId = (Guid)IgrssAdapters.LAppTableAdapter.GetWfIdByLicenseApplicationId(LicenseApplicationId);
                if (Verified)
                {
                    FeedbackEventArgs args = new FeedbackEventArgs(InstanceId, AlertId, curUser);
                    WorkflowMediator.LicenseApplicationServices.ValidateLicenseApplication(InstanceId, args);
                }
                else
                {
                    ApplicationUpdatedEventArgs args = new ApplicationUpdatedEventArgs(InstanceId, (LicenseApplicationRow)Parameter.Values);
                    WorkflowMediator.LicenseApplicationServices.UpdateApplication(InstanceId, args);
                }

                //Guid InstanceId = (Guid) IgrssAdapters.ComplainAdapter.GetWfIdByComplainId(ComplainId);
                //InvestigationRequiredEventArgs args = new InvestigationRequiredEventArgs(InstanceId);
                //args.InvestigatingOfficer = InvestigatingOfficer;
                //WorkflowMediator.ComplainServices.RequireInvestigation(InstanceId, args);
                return true;

            }
            catch (Exception ex)
            {
                if (ExceptionPolicy.HandleException(ex, "DAL"))
                    throw;
                return false;
            }
        }