Beispiel #1
0
    protected void GvRefundAlerts_SelectedIndexChanged(object sender, EventArgs e)
    {
        string ID = GvRefundAlerts.SelectedDataKey.Value.ToString();

        fldRefundId.Value = ID;
        mvRefund.SetActiveView(mvRefund.Views[2]);
        FvRefundReadOnly.ChangeMode(FormViewMode.ReadOnly);

        //fvRefundApplication.ChangeMode(FormViewMode.ReadOnly);
        //        break;
        //    case "Approve":
        //        mvRefund.SetActiveView(mvRefund.Views[0]);
        //        fvRefundApplication.ChangeMode(FormViewMode.ReadOnly);
        //        break;
        //}
    }
Beispiel #2
0
 protected void GvRefundReadOnly_SelectedIndexChanged(object sender, EventArgs e)
 {
     mvRefund.SetActiveView(mvRefund.Views[1]);
     FvRefundReadOnly.ChangeMode(FormViewMode.ReadOnly);
 }
Beispiel #3
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");
    }