コード例 #1
0
    private void Init_Form()
    {
        lblHeader.Text = ViewState["ListName"].ToString();

        ICustomList CustomManager = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration");
        DataTable   theDT         = CustomManager.GetCustomList(ViewState["TableName"].ToString(), Convert.ToInt32(ViewState["CategoryId"]), Convert.ToInt32(Session["SystemId"]));

        if (ViewState["ModuleId"] != null)
        {
            if (Convert.ToInt32(ViewState["ModuleId"]) > 0 && ViewState["TableName"].ToString().ToUpper() == "DECODE")
            {
                IQCareUtils theUtilsCF = new IQCareUtils();
                DataView    theDVCF    = new DataView(theDT);
                theDVCF.RowFilter = "ModuleId in(0," + Convert.ToInt32(ViewState["ModuleId"]) + ")";
                theDT             = new DataTable();
                theDT             = (DataTable)theUtilsCF.CreateTableFromDataView(theDVCF);
            }
        }
        if (ViewState["gridSource"] == null)
        {
            ViewState["gridSource"]        = theDT;
            ViewState["gridSortDirection"] = "Desc";
        }

        grdCustom.DataSource = theDT;
        Bind_Grid();
    }
コード例 #2
0
    private void Init_Form()
    {
        if (ViewState["TableName"].ToString() != "HivDisease")
        {
            lblHeader.Text = ViewState["ListName"].ToString();
            ////////// Done by Sanjay on 19th Sept 2006  ////////////////////////////////////////
            ////////// For all the Custom List the ListName field of XML file will be Used //////
            ////////if (Convert.ToInt32(ViewState["CategoryId"]) > 0)
            //////// lblHeader.Text = ViewState["ListName"].ToString();
            /////////////////////////////////////////////////////////////////////////////////////
        }
        else
        {
            lblHeader.Text = "OIs or AIDS Defining Illnesses";
        }

        ICustomList CustomManager = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration");
        DataTable   theDT         = CustomManager.GetCustomList(ViewState["TableName"].ToString(), Convert.ToInt32(ViewState["CategoryId"]), Convert.ToInt32(Session["SystemId"]));

        if (ViewState["gridSource"] == null)
        {
            ViewState["gridSource"]        = theDT;
            ViewState["gridSortDirection"] = "Desc";
        }

        grdCustom.DataSource = theDT;
        Bind_Grid();
    }
コード例 #3
0
    private void Init_Form()
    {
        if (ViewState["TableName"].ToString() != "HivDisease")
        {
            lblHeader.Text = ViewState["ListName"].ToString();
            ////////// Done by Sanjay on 19th Sept 2006  ////////////////////////////////////////
            ////////// For all the Custom List the ListName field of XML file will be Used //////
            ////////if (Convert.ToInt32(ViewState["CategoryId"]) > 0)
            //////// lblHeader.Text = ViewState["ListName"].ToString();
            /////////////////////////////////////////////////////////////////////////////////////
        }
        else
        {
            lblHeader.Text = "OIs or AIDS Defining Illnesses";
        }
        DataTable theDTModule = (DataTable)Session["AppModule"];
        string    theModList  = "";

        foreach (DataRow theDR in theDTModule.Rows)
        {
            if (theModList == "")
            {
                theModList = theDR["ModuleId"].ToString();
            }
            else
            {
                theModList = theModList + "," + theDR["ModuleId"].ToString();
            }
        }
        ICustomList CustomManager = (ICustomList)ObjectFactory.CreateInstance("BusinessProcess.Administration.BCustomList, BusinessProcess.Administration");
        DataTable   theDT         = CustomManager.GetCustomList(ViewState["TableName"].ToString(), Convert.ToInt32(ViewState["CategoryId"]), Convert.ToInt32(Session["SystemId"]));

        if (ViewState["gridSource"] == null)
        {
            ViewState["gridSource"]        = theDT;
            ViewState["gridSortDirection"] = "Desc";
        }

        grdCustom.DataSource = theDT;
        if (ViewState["TableName"].ToString().ToLower() == "HIVDisease".ToLower() || ViewState["TableName"].ToString().ToLower() == "Symptom".ToLower())
        {
            Bind_GridDiseaseSymptom();
        }
        else
        {
            Bind_Grid();
        }
    }