Esempio n. 1
0
    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;
            }
        }
    }
Esempio n. 2
0
    protected void grdAlerts_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        IgrssAlert curAlert = (IgrssAlert)e.Row.DataItem;

        if (curAlert != null)
        {
            e.Row.Enabled = curAlert.IsActive;
        }
    }
Esempio n. 3
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);
 }
Esempio n. 4
0
        public IgrssAlert GetAlertById(Guid AlertId)
        {
            IgrssAlert      RetAlert = null;
            AlertsDataTable dt       = IgrssAdapters.Alerts.GetAlertsById(AlertId);

            if (dt.Rows.Count > 0)
            {
                RetAlert = DecodeAlert((AlertsRow)dt.Rows[0]);
            }
            //TODO: Get the alert from database
            return(RetAlert);
        }
Esempio n. 5
0
        IgrssAlert DecodeAlert(AlertsRow row)
        {
            IgrssAlert alert = new IgrssAlert();

            alert.AlertId  = row.AlertId;
            alert.Message  = row.Message;
            alert.IsActive = row.IsActive;
            alert.SentAt   = row.SentAt;
            alert.SentBy   = row.SentBy;
            alert.SentTo   = row.SentTo;
            alert.Link     = row.Link;
            XmlDocument doc = new XmlDocument();

            doc.LoadXml(row.Info);
            alert.SessionData = WorkflowSupport.DeSerilizeDictionary(doc);

            return(alert);
        }
 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();
     }
 }
Esempio n. 7
0
    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();
        }
    }
Esempio n. 8
0
    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();
        }
    }
Esempio n. 9
0
    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();
        }
    }
Esempio n. 10
0
    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");
    }
Esempio n. 11
0
    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);
            }
        }
    }
Esempio n. 12
0
    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);
            //}
        }
    }