Example #1
0
        protected void SetBindData()
        {
            string strSql = "Select id,name,englishname From cd_size Where id>='' ";

            if (txtSize.Text != "")
            {
                strSql += " AND id Like " + "'%" + txtSize.Text + "%'";
            }
            if (txtName.Text != "")
            {
                strSql += " AND name Like " + "'%" + txtName.Text + "%'";
            }
            if (txtEname.Text != "")
            {
                strSql += " AND englishname Like " + "'%" + txtEname.Text + "%'";
            }
            //if (id == "" && name == "" && ename == "")
            //    strSql += " AND id = 'ZZZZZZ' ";
            strSql += " Order By id";
            DataTable tbMat = sh.ExecuteSqlReturnDataTableGeo(strSql);

            if (tbMat.Rows.Count == 0)
            {
                tbMat.Rows.Add();
            }

            gvDetails.DataSource = tbMat.DefaultView;
            gvDetails.DataBind();
        }
Example #2
0
        protected void SetBindData()
        {
            string    strSql = "Select id,name,english_name,datum From cd_datum Order By id";
            DataTable tbMat  = sh.ExecuteSqlReturnDataTableGeo(strSql);

            if (tbMat.Rows.Count == 0)
            {
                tbMat.Rows.Add();
            }

            gvDetails.DataSource = tbMat.DefaultView;
            gvDetails.DataBind();
        }
Example #3
0
        protected void FindMoOc()
        {
            //imgZp.ImageUrl = "";
            string strSql = "Select a.id,a.it_customer,c.name AS cust_name,a.seller_id,a.merchandiser,e.name AS sales_name" +
                            ",(b.order_qty*f.rate) AS order_qty" +
                            ",b.goods_unit,b.goods_id,b.remark,b.plate_remark,d.production_remark" +
                            " FROM dbo.so_order_manage a" +
                            " INNER JOIN dbo.so_order_details b ON a.within_code=b.within_code AND a.id=b.id AND a.ver=b.ver" +
                            " LEFT JOIN dbo.it_customer c ON a.within_code=c.within_code AND a.it_customer=c.id" +
                            " LEFT JOIN dbo.So_order_special_info d ON b.within_code=d.within_code AND b.id=d.id AND b.ver=d.ver AND b.sequence_id=d.upper_sequence" +
                            " LEFT JOIN dbo.cd_personnel e ON a.within_code=e.within_code AND a.merchandiser=e.id" +
                            " INNER JOIN it_coding f ON b.within_code=f.within_code AND b.goods_unit=f.unit_code" +
                            " WHERE b.within_code='" + within_code + "' AND f.id='" + "*" + "' AND b.mo_id='" + txtMo.Text.ToUpper() + "'";
            DataTable tbOc = sh.ExecuteSqlReturnDataTableGeo(strSql);

            if (tbOc.Rows.Count > 0)
            {
                txtOcNo.Text         = tbOc.Rows[0]["id"].ToString();
                txtSales.Text        = tbOc.Rows[0]["sales_name"].ToString();
                txtCustCode.Text     = tbOc.Rows[0]["it_customer"].ToString();
                txtCustDesc.Text     = tbOc.Rows[0]["cust_name"].ToString();
                txtOrder_qty.Text    = (tbOc.Rows[0]["order_qty"].ToString() != "" ? Convert.ToInt32(tbOc.Rows[0]["order_qty"]).ToString() : "");
                txtGoods_unit.Text   = "PCS";// tbOc.Rows[0]["goods_unit"].ToString();
                txtRemark.Text       = tbOc.Rows[0]["remark"].ToString();
                txtProd_Remark.Text  = tbOc.Rows[0]["production_remark"].ToString();
                txtPlate_Remark.Text = tbOc.Rows[0]["plate_remark"].ToString();
                //string strImagePath = DBUtility.imageDetaultPath + cls.clsPublic.GetImagePath(tbOc.Rows[0]["goods_id"].ToString());
                //strImagePath = "Y://Artwork//AAAAA//A888001.bmp";
                //imgZp.ImageUrl = strImagePath;
            }
            else
            {
                txtRemark.Text       = "";
                txtProd_Remark.Text  = "";
                txtPlate_Remark.Text = "";
            }
        }
Example #4
0
        protected void SetBindData()
        {
            string strSql = "Select id,name,english_name From cd_season Where id>='' ";

            //if (id != "")
            //    strSql += " AND id Like " + "'%" + id + "%'";
            //if (name != "")
            //    strSql += " AND name " + "'%" + name + "%'";
            //if (ename != "")
            //    strSql += " AND englishname " + "'%" + ename + "%'";
            //if (id == "" && name == "" && ename == "")
            //    strSql += " AND id = 'ZZZZZZ' ";
            strSql += " Order By id";
            DataTable tbMat = sh.ExecuteSqlReturnDataTableGeo(strSql);

            if (tbMat.Rows.Count == 0)
            {
                tbMat.Rows.Add();
            }

            gvDetails.DataSource = tbMat.DefaultView;
            gvDetails.DataBind();
        }