Esempio n. 1
0
        protected void LnkBtnQBackCreate_Click(object sender, EventArgs e)
        {
            divCreateJjd.Visible = true;
            divReqData.Visible   = false;

            BtnJoinJjd.Disabled = true;
            BtnNewJjd.Enabled   = false;

            divJjdDisplay.Visible = false;
            divJjdQuery.Visible   = false;

            InitQuery();

            ViewState["GVReqData"] = null;
            GVReqData.DataBind();
        }
Esempio n. 2
0
        private void GVReqDataDataBind()
        {
            StringBuilder sql = new StringBuilder();

            sql.Append("select t.*,release_qty - nvl(jjd_qty,0) kp_qty,nvl(jjd_qty,0) yp_qty,release_qty from jp_requisition_vw t");
            sql.Append(" where rowstate in ('released')");
            sql.Append(" and nvl(jjd_qty,0)<release_qty");

            if (TxtRecieveDate.Text == "" || DdlReceiptDept.SelectedValue == "0" || DdlReceiptPlace.SelectedValue == "0" || DdlReceiptPerson.SelectedValue == "0")
            {
                Misc.Message(this.GetType(), ClientScript, "请输入必添的项目后,再查询!");
                return;
            }
            if (DdlReceiptPlace.SelectedValue != "0")
            {
                sql.Append(string.Format(" and place='{0}' ", DdlReceiptPlace.SelectedValue));
            }
            if (DdlReceiptDept.SelectedValue != "0")
            {
                sql.Append(string.Format(" and receipt_dept='{0}'", DdlReceiptDept.SelectedValue));
            }
            if (DdlReceiptPerson.SelectedValue != "0")
            {
                sql.Append(string.Format(" and receiver='{0}'", DdlReceiptPerson.SelectedValue));
            }
            if (DdlProject.SelectedValue != "0")
            {
                sql.Append(string.Format(" and project_id='{0}'", DdlProject.SelectedValue));
            }
            //增加可选的下达库管过滤条件
            if (DdlReleasePerson.SelectedValue != "0")
            {
                sql.Append(string.Format(" and release_user='******'", DdlReleasePerson.SelectedValue));
            }
            sql.Append(string.Format(" and receive_date = to_date('{0}','yyyy-mm-dd')", TxtRecieveDate.Text));
            sql.Append(" order by part_no");

            GVReqData.DataSource = DBHelper.createGridView(sql.ToString());
            GVReqData.DataBind();
        }