protected void Page_Load(object sender, EventArgs e)
    {
        //vieGrid.Visible = true;
        //vieFv.Visible = false;
        if (!IsPostBack)
        {
            switch (Request.Params["Mode"])
            {
            case "DataEntry":
                mvInward.SetActiveView(mvInward.Views[1]);
                FvInward.ChangeMode(FormViewMode.Insert);
                break;

            case "Verify":
                mvInward.SetActiveView(mvInward.Views[0]);
                break;

            case "ReadOnly":
                Response.Redirect("~/Inward-Outward/InwardOutwardReport.aspx");
                break;
            }
        }


        //if (FvInward.CurrentMode == FormViewMode.Insert)
        //{
        //Creating Instance Of the IgrssGlobalConfigTableAdapter
        //IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
        ////Calling Bll method and storing result into XmlDataSource
        //XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
        ////Binding XmlDataSource
        //XmlInwarddoctype.DataBind();
        //Calling Bll method and storing result into XmlDataSource
        //XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
        //Binding XmlDataSource
        //XmlInwardtype.DataBind();
        //}
        if (FvInward.CurrentMode == FormViewMode.Edit)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            XmlInwardtype.DataBind();
        }
    }
Exemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        switch (Request.Params["Mode"])
        {
        case "DataEntry":
            mvLeave.SetActiveView(mvLeave.Views[1]);
            fvLeave.ChangeMode(FormViewMode.Insert);
            break;

        case "Verify":
            mvLeave.SetActiveView(mvLeave.Views[0]);

            break;

        case "ReadOnly":
            mvLeave.SetActiveView(mvLeave.Views[0]);

            break;
        }
        Session["Mode"] = Request.Params["Mode"];
        if (fvLeave.CurrentMode == FormViewMode.Insert)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlLeaveType.Data = (string)ConfigAdapter.GetConfigByModule("LEA", "LEATYPE");
            //Binding XmlDataSource
            XmlLeaveType.DataBind();
        }
        if (fvLeave.CurrentMode == FormViewMode.Edit)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlLeaveType.Data = (string)ConfigAdapter.GetConfigByModule("REF", "CompType");
            //Binding XmlDataSource
            XmlLeaveType.DataBind();
        }
        if (fvreadonly.CurrentMode == FormViewMode.ReadOnly)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlLeaveType.Data = (string)ConfigAdapter.GetConfigByModule("REF", "CompType");
            //Binding XmlDataSource
            XmlLeaveType.DataBind();
        }
    }
 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();
     }
 }
Exemplo n.º 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            switch (Request.Params["Mode"])
            {
            case "DataEntry":
                mvOutwardRegister.SetActiveView(mvOutwardRegister.Views[1]);
                FvOutward.ChangeMode(FormViewMode.Insert);
                break;

            case "Verify":
                mvOutwardRegister.SetActiveView(mvOutwardRegister.Views[0]);
                break;
            }
        }
        if (FvOutward.CurrentMode == FormViewMode.Insert)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            XmlInwardtype.DataBind();
        }
        if (FvOutward.CurrentMode == FormViewMode.Edit)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            XmlInwardtype.DataBind();
        }
    }
Exemplo n.º 5
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();
        }
    }
Exemplo n.º 6
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();
        }
    }
Exemplo n.º 7
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();
        }
    }
Exemplo n.º 8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            switch (Request.Params["Mode"])
            {
                case "DataEntry":
                    mvBTBInward.SetActiveView(mvBTBInward.Views[1]);
                    fvBTBInward.ChangeMode(FormViewMode.Insert);
                    break;
                case "Verify":
                    mvBTBInward.SetActiveView(mvBTBInward.Views[0]);
                    break;

            }
        }
        if (fvBTBInward.CurrentMode == FormViewMode.Insert)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            XmlInwardtype.DataBind();
        }
        if (fvBTBInward.CurrentMode == FormViewMode.Edit)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            XmlInwardtype.DataBind();
        }
    }
Exemplo 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"]));
                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)
 {
     //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();
     }
 }
Exemplo n.º 11
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");
    }
Exemplo n.º 12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        //vieGrid.Visible = true;
        //vieFv.Visible = false;
        if (!IsPostBack)
        {
            switch (Request.Params["Mode"])
            {
                case "DataEntry":
                    mvInward.SetActiveView(mvInward.Views[1]);
                    FormView_Inward.ChangeMode(FormViewMode.Insert);
                    break;
                case "Verify":
                    mvInward.SetActiveView(mvInward.Views[0]);
                    break;
                case "ReadOnly":
                    Response.Redirect("~/Inward-Outward/InwardOutwardReport.aspx");
                    break;
            }

        }

        if (FormView_Inward.CurrentMode == FormViewMode.Insert)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            //XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
        //XmlInwardtype.DataBind();
        }
        if (FormView_Inward.CurrentMode == FormViewMode.Edit)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwarddoctype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWDOCTYPE");
            //Binding XmlDataSource
            XmlInwarddoctype.DataBind();
            //Calling Bll method and storing result into XmlDataSource
            XmlInwardtype.Data = (string)ConfigAdapter.GetConfigByModule("IOW", "IOWTYPE");
            //Binding XmlDataSource
            XmlInwardtype.DataBind();
        }
    }
Exemplo n.º 13
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();
        }
    }
Exemplo n.º 14
0
    protected void Page_Load(object sender, EventArgs e)
    {
        switch (Request.Params["Mode"])
        {
            case "DataEntry":
                mvLeave.SetActiveView(mvLeave.Views[1]);
                fvLeave.ChangeMode(FormViewMode.Insert);
                break;
            case "Verify":
                mvLeave.SetActiveView(mvLeave.Views[0]);

                break;
            case "ReadOnly":
                mvLeave.SetActiveView(mvLeave.Views[0]);

                break;
        }
        Session["Mode"] = Request.Params["Mode"];
        if (fvLeave.CurrentMode == FormViewMode.Insert)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlLeaveType.Data = (string) ConfigAdapter.GetConfigByModule("LEA", "LEATYPE");
            //Binding XmlDataSource
            XmlLeaveType.DataBind();
        }
        if (fvLeave.CurrentMode == FormViewMode.Edit)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlLeaveType.Data = (string) ConfigAdapter.GetConfigByModule("REF", "CompType");
            //Binding XmlDataSource
            XmlLeaveType.DataBind();
        }
        if (fvreadonly.CurrentMode == FormViewMode.ReadOnly)
        {
            //Creating Instance Of the IgrssGlobalConfigTableAdapter
            IgrssGlobalConfigTableAdapter ConfigAdapter = new IgrssGlobalConfigTableAdapter();
            //Calling Bll method and storing result into XmlDataSource
            XmlLeaveType.Data = (string) ConfigAdapter.GetConfigByModule("REF", "CompType");
            //Binding XmlDataSource
            XmlLeaveType.DataBind();
        }
    }