public static string[] GetClassValue(int classId)
    {
        EasyDataProvide ModuleClass = new EasyDataProvide("ModuleClass");
        DataTable dtClass = ModuleClass.GetAllData();
        string[] classValues = new string[3];

        DataView dv3 = new DataView(dtClass);
        dv3.RowFilter = "id=" + classId;

        if (dv3.Count > 0)
        {
            classValues[2] = dv3[0]["id"].ToString();
            DataView dv2 = new DataView(dtClass);
            dv2.RowFilter = "id=" + dv3[0]["parentID"].ToString();
            if (dv2.Count > 0)
            {
                classValues[1] = dv2[0]["id"].ToString();
                DataView dv1 = new DataView(dtClass);
                dv1.RowFilter = "id=" + dv2[0]["parentID"].ToString();
                if (dv1.Count > 0)
                {

                    classValues[0] = dv1[0]["id"].ToString();
                }
            }

        }

        return classValues;
    }
Exemple #2
0
    private void Show()
    {
        DataTable dt = _EmailTemplats.GetAllData();

        gvList.DataSource = dt;
        gvList.DataBind();
    }
Exemple #3
0
    static public string[] GetClassValue(int classId)
    {
        EasyDataProvide ModuleClass = new EasyDataProvide("ModuleClass");
        DataTable       dtClass     = ModuleClass.GetAllData();

        string[] classValues = new string[3];

        DataView dv3 = new DataView(dtClass);

        dv3.RowFilter = "id=" + classId;

        if (dv3.Count > 0)
        {
            classValues[2] = dv3[0]["id"].ToString();
            DataView dv2 = new DataView(dtClass);
            dv2.RowFilter = "id=" + dv3[0]["parentID"].ToString();
            if (dv2.Count > 0)
            {
                classValues[1] = dv2[0]["id"].ToString();
                DataView dv1 = new DataView(dtClass);
                dv1.RowFilter = "id=" + dv2[0]["parentID"].ToString();
                if (dv1.Count > 0)
                {
                    classValues[0] = dv1[0]["id"].ToString();
                }
            }
        }

        return(classValues);
    }
Exemple #4
0
    private void ShowOrg()
    {
        EasyDataProvide UnitName = new EasyDataProvide("UnitName");
        DataTable       dt       = UnitName.GetAllData();

        ddlOrg.DataSource = dt;
        ddlOrg.DataBind();
    }
Exemple #5
0
    private void Show()
    {
        TIN.EasyDataProvide UnitName = new EasyDataProvide("UnitName");
        DataTable           dt       = UnitName.GetAllData();

        gvList.DataSource = dt;
        gvList.DataBind();
    }
Exemple #6
0
    private void ShowCustomer()
    {
        TIN.EasyDataProvide Customer = new EasyDataProvide("Customer");
        DataTable           dt       = Customer.GetAllData();

        ddlCustomer.DataTextField  = "aliasName";
        ddlCustomer.DataValueField = "id";
        ddlCustomer.DataSource     = dt;
        ddlCustomer.DataBind();
    }
Exemple #7
0
    private void ShowOrg()
    {
        EasyDataProvide UnitName = new EasyDataProvide("UnitName");
        DataTable       dt       = UnitName.GetAllData();

        ddlOrg.DataSource = dt;
        ddlOrg.DataBind();
        ListItem item = new ListItem("全部", "");

        ddlOrg.Items.Insert(0, item);
    }
Exemple #8
0
    private void ShowCustomer()
    {
        TIN.EasyDataProvide Customer = new EasyDataProvide("Customer");
        DataTable           dt       = Customer.GetAllData();

        ddlCustomer.DataTextField  = "aliasName";
        ddlCustomer.DataValueField = "id";
        ddlCustomer.DataSource     = dt;
        ddlCustomer.DataBind();
        ListItem item = new ListItem("全部", "");

        ddlCustomer.Items.Insert(0, item);
    }
    private void ShowRole()
    {
        EasyDataProvide role   = new EasyDataProvide("Role");
        DataTable       dtRole = role.GetAllData();

        ddlRole.DataTextField  = "roleName";
        ddlRole.DataValueField = "id";
        ddlRole.DataSource     = dtRole;
        ddlRole.DataBind();
        if (ddlRole.Items.Count == 0)
        {
            trRole.Visible = false;
        }
    }
Exemple #10
0
    private void ShowOrganization()
    {
        EasyDataProvide UnitName   = new EasyDataProvide("UnitName");
        DataTable       dtUnitName = UnitName.GetAllData("order by listNum");

        OrganizationID.DataTextField  = "title";
        OrganizationID.DataValueField = "id";
        OrganizationID.DataSource     = dtUnitName;
        OrganizationID.DataBind();
        ListItem item = new ListItem("未指定", "0");

        OrganizationID.Items.Add(item);
        if (OrganizationID.Items.Count == 1)
        {
            trUnit.Visible = false;
        }
    }