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();
        }
    }
示例#2
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();
        }
    }