protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Response.Expires = 0;
            Response.AddHeader("pragma", "no-cache");
            Response.AddHeader("cache-control", "private");
            Response.CacheControl = "no-cache";

            this.btnClose.OnClientClick = "window.close(); return false;";
            SearchFlow flow = new SearchFlow();
            PopupStockinReturnSearchData data = new PopupStockinReturnSearchData();

            if (Request.QueryString["DOCTYPE"] != null)
            {
                data.DOCTYPE = Convert.ToDouble(Request.QueryString["DOCTYPE"].ToString() == "" ? "0" : Request.QueryString["DOCTYPE"].ToString());
            }
            if (Request.QueryString["CUSTOMER"] != null)
            {
                data.CUSTOMER = Convert.ToDouble(Request.QueryString["CUSTOMER"].ToString() == "" ? "0" : Request.QueryString["CUSTOMER"].ToString());
            }
            if (Request.QueryString["REFLOID"] != null)
            {
                data.REFLOID = Convert.ToDouble(Request.QueryString["REFLOID"].ToString() == "" ? "0" : Request.QueryString["REFLOID"].ToString());
            }
            this.grvItem.DataSource = flow.GetStockinReturnSearchList(data);
            this.grvItem.DataBind();
        }
    }
Exemple #2
0
        public static DataTable GetStockinReturnSearchList(PopupStockinReturnSearchData data)
        {
            string where = "QTY > 0 AND CUSTOMER = " + data.CUSTOMER.ToString() + " ";

            if (data.DOCTYPE != 0)
                where += (where == "" ? "" : "AND ") + "DOCTYPE = " + data.DOCTYPE.ToString() + " ";

            //if (data.CUSTOMER != 0)
            //    where += (where == "" ? "" : "AND ") + "CUSTOMER = " + data.CUSTOMER.ToString() + " ";

            if (data.REFLOID != 0)
                where += (where == "" ? "" : "AND ") + "REFLOID = " + data.REFLOID.ToString() + " ";

            string sql = "SELECT PDLOID, PDNAME, LOTNO, QTY, UNAME, DOCCODE, DOCNAME, REFLOID ";
            sql += "FROM V_RETURN_WAIT_LIST ";
            sql += (where == "" ? "" : "WHERE " + where);
            sql += "ORDER BY PDNAME, DOCCODE DESC,LOTNO DESC";
            return OracleDB.ExecListCmd(sql);
        }
Exemple #3
0
 public DataTable GetStockinReturnSearchList(PopupStockinReturnSearchData data)
 {
     return SearchDAL.GetStockinReturnSearchList(data);
 }