using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI.WebControls;

/// <summary>
///OfficeManage 的摘要说明
/// </summary>
public class OfficeManage
{
	public OfficeManage()
	{
		//
		//TODO: 在此处添加构造函数逻辑
		//
	}
    #region 绑定支出类型
    /// <summary>
    /// 绑定支出类型
    /// </summary>
    /// <param name="ddl">绑定的支出类型dropDownList</param>
    public static void BindDdlExpenditureType(DropDownList ddl)
    {
        ControlHelper.BindDropDownList(ddl, "constring", "SELECT ExpenditureTypeId,ExpenditureTypeName FROM dbo.tabA_Type_Expenditure WHERE State=1", "ExpenditureTypeId", "ExpenditureTypeName");
        ddl.Items.Insert(0,new ListItem ("请选择支出类型","0"));
    }
    #endregion

    #region 绑定收入类型
    /// <summary>
    /// 绑定收入类型
    /// </summary>
    /// <param name="ddl">绑定的收入类型dropDownList</param>
    public static void BindDdlIncomeType(DropDownList ddl)
    {
        ControlHelper.BindDropDownList(ddl, "constring", "SELECT IncomeTypeId,IncomeTypeName FROM dbo.tabA_Type_Income WHERE State=1", "IncomeTypeId", "IncomeTypeName");
        ddl.Items.Insert(0,new ListItem ("请选择收入类型","0"));
    }
    #endregion

    #region 绑定成员
    /// <summary>
    /// 绑定成员
    /// </summary>
    /// <param name="ddl">绑定的成员dropDownList</param>
    public static void BindDdlMember(DropDownList ddl)
    {
        ControlHelper.BindDropDownList(ddl, "constring", "SELECT MemberTypeId,MemberTypeName FROM dbo.tabA_Type_Member WHERE State=1", "MemberTypeId", "MemberTypeName");
        ddl.Items.Insert(0,new ListItem("请选择成员","0"));
    }
    #endregion

    #region 绑定项目
    /// <summary>
    /// 绑定项目
    /// </summary>
    /// <param name="ddl">绑定的项目dropDownList</param>
    public static void BindDdlProject(DropDownList ddl)
    {
        ControlHelper.BindDropDownList(ddl, "constring", "SELECT ProjectTypeId,ProjectTypeName FROM dbo.tabA_Type_Project WHERE State=1", "ProjectTypeId", "ProjectTypeName");
        ddl.Items.Insert(0,new ListItem ("请选择项目","0"));
    }
    #endregion

    #region 绑定商家/付款方
    /// <summary>
    /// 绑定商家/付款方
    /// </summary>
    /// <param name="ddl">绑定的绑定商家/付款方dropDownList</param>
    public static void BindDdlSeller(DropDownList ddl)
    {
        ControlHelper.BindDropDownList(ddl, "constring", "SELECT SellerId,SellerName FROM dbo.tabA_Type_Seller WHERE State=1", "SellerId", "SellerName");
        ddl.Items.Insert(0,new ListItem("请选择","0"));
    }
    #endregion

    #region 绑定借贷账户
    /// <summary>
    /// 绑定借贷账户
    /// </summary>
    /// <param name="ddl"></param>
    public static void BindLoanAccount(DropDownList ddl)
    {
        ControlHelper.BindDropDownList(ddl, "constring", "SELECT LoanAccountId,LoanAccountName FROM dbo.tabA_Account_Loan WHERE State=1", "LoanAccountId", "LoanAccountName");
        ddl.Items.Insert(0,new ListItem ("请选择","0"));
    }
    #endregion


}