Ejemplo n.º 1
0
        /// <summary>
        /// 绑定项目下拉列表框
        /// </summary>
        /// <param name="enterprise"></param>
        public void GetProjectList(string enterprise)
        {
            //绑定项目下拉列表框
            var query = DbHelperSql.Query("select DISTINCT ProjectName from  Project where EnterpriseName like '" + enterprise + "'");

            DropDownListXM.DataSource     = query;
            DropDownListXM.DataTextField  = "ProjectName";
            DropDownListXM.DataValueField = "ProjectName";
            DropDownListXM.DataBind();
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }
            var query = DbHelperSql.Query("select DISTINCT ProjectName from  Employee");

            DropDownListXM.DataSource     = query;
            DropDownListXM.DataValueField = "ProjectName";
            DropDownListXM.DataTextField  = "ProjectName";
            DropDownListXM.DataBind();
            A("");
            B("");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 页面加载
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack)
            {
                return;
            }
            if (ActionValidator("FinancialAdd"))
            {
                var query = DbHelperSql.Query("select DISTINCT EnterpriseName from  Eenterprises where Audit='已通过'");
                DropDownList_qy.DataSource     = query;
                DropDownList_qy.DataTextField  = "EnterpriseName";
                DropDownList_qy.DataValueField = "EnterpriseName";
                DropDownList_qy.DataBind();

                var entity = DbHelperSql.Query("select DISTINCT ProjectName from  Project ");
                DropDownListXM.DataSource     = entity;
                DropDownListXM.DataTextField  = "ProjectName";
                DropDownListXM.DataValueField = "ProjectName";
                DropDownListXM.DataBind();
                if (!string.IsNullOrEmpty(Request.QueryString["FID"]))
                {
                    var data = DbHelperSql.Query("select * from Financial where FID='" + Request.QueryString["FID"] + "'");
                    txtTrueMoney.Text           = data.Tables[0].Rows[0]["PayMoney"].ToString();
                    FZperson.Text               = data.Tables[0].Rows[0]["Person"].ToString();
                    DropDownList2.SelectedValue = data.Tables[0].Rows[0]["IsPay"].ToString();
                    time.Text = data.Tables[0].Rows[0]["SuccessfulTime"].ToString();
                    note.Text = data.Tables[0].Rows[0]["Note"].ToString();
                    //项目
                    DropDownListXM.SelectedValue = data.Tables[0].Rows[0]["ProjectName"].ToString();
                    //企业
                    DropDownList_qy.SelectedValue = data.Tables[0].Rows[0]["EnterpriseName"].ToString();
                }
            }
            else
            {
                AlertAndParentSkip("没有权限", "FinancialList");
            }
        }