예제 #1
0
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        string wareHouseID = DropDownList1.SelectedItem.Value;

        DropDownList2.DataSource = CompanyConsignBLL.GetDepotSeat(wareHouseID);
        DropDownList2.DataBind();
    }
예제 #2
0
    public void SetConsignment(List <StoreOrderModel> lsom, string mode)
    {
        string isSucceed = CompanyConsignBLL.Consign(lsom);  //

        string _OutStorageOrderID = ((StoreOrderModel)lsom[0]).OutStorageOrderID;

        if (isSucceed == "Y")
        {
            if (mode == "one")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>if(window.confirm('" + GetTran("001515", "发货成功,您要打印此单据吗?") + "')) window.open('docPrint.aspx?docID=" + _OutStorageOrderID + "');window.location.href='CompanyConsign.aspx';</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("001517", "批量发货成功!") + "')</script>");

                btn_Submit_Click(null, null);
            }
        }
        else
        {
            if (mode == "one")
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>if(confirm('订单号:" + isSucceed + " ,  没有生成出库单,确定出库?')) location.href='Outstock.aspx?StoreOrderID=" + isSucceed + "&title=请填写出库单:&enable=N&isBut=CK&source=fh'</script>");
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "", "<script>alert('" + GetTran("001518", "订单:") + "" + isSucceed + " " + GetTran("001520", ",未生成出库单!") + "')</script>");
            }
        }
    }
예제 #3
0
    public void InitData()
    {
        DataTable dt = WareHouseDAL.GetWareHouseName();

        DropDownList1.DataSource = dt;
        DropDownList1.DataBind();

        string wareHouseID = DropDownList1.SelectedItem.Value;

        DropDownList2.DataSource = CompanyConsignBLL.GetDepotSeat(wareHouseID);
        DropDownList2.DataBind();
    }
예제 #4
0
    public void SetUniteConsignment(List <string> docIDs)
    {
        List <StoreOrderModel> lsom = new List <StoreOrderModel>();

        for (int i = 0; i < docIDs.Count; i++)
        {
            StoreOrderModel som = CompanyConsignBLL.GetStoreOrder(docIDs[i]);

            lsom.Add(som);
        }

        SetConsignment(lsom, "more");
    }
예제 #5
0
파일: FaHuo.aspx.cs 프로젝트: 892182825/SP
    protected void Page_Load(object sender, EventArgs e)
    {
        Permissions.ComRedirect(Page, Permissions.redirUrl);
        Response.Cache.SetExpires(DateTime.Now);
        Permissions.CheckManagePermission(EnumCompanyPermission.LogisticsCompanyConsignOut);

        this.DataBind();

        if (!IsPostBack)
        {
            string storeOrderID = Request.QueryString["StoreOrderID"].ToString();

            TextBox3.Text = GetTran("001711", "订单发货");

            //DataTable dt = BillOutOrderBLL.GetWareHouseName();

            DataTable dt = BillOutOrderBLL.GetWareHouseName_Currency("1");

            if (dt.Rows.Count == 0)
            {
                Response.Write("<script>alert('" + GetTran("001293", "你没有仓库权限,所以不能查看此页面") + "')</script>");
                Response.End();
                return;
            }
            string sql = "select inWareHouseID,inDepotSeatID,storeorderid from InventoryDoc where docid='" + storeOrderID + "'";

            DataTable wd = DBHelper.ExecuteDataTable(sql);
            ViewState["storeorderid"]    = wd.Rows[0][2].ToString();
            DropDownList1.DataTextField  = "WareHouseName";
            DropDownList1.DataValueField = "WareHouseID";
            DropDownList1.DataSource     = dt;
            DropDownList1.DataBind();
            DropDownList1.SelectedValue = wd.Rows[0][0] == null ? "1" : wd.Rows[0][0].ToString();
            DropDownList1.Enabled       = false;
            string wareHouseID = DropDownList1.SelectedItem.Value;

            DropDownList2.DataTextField  = "SeatName";
            DropDownList2.DataValueField = "DepotSeatID";
            DropDownList2.DataSource     = CompanyConsignBLL.GetDepotSeat(wareHouseID);
            DropDownList2.DataBind();
            DropDownList2.Enabled       = false;
            DropDownList2.SelectedValue = wd.Rows[0][1] == null ? "1" : wd.Rows[0][1].ToString();
            string admin = Session["Company"].ToString();

            string[] arrtime = DateTime.Now.ToString("yyyy-MM-dd").Split('-');

            string timestr = arrtime[0];

            if (arrtime[1].Length == 1)
            {
                timestr = timestr + "0" + arrtime[1];
            }
            else
            {
                timestr = timestr + arrtime[1];
            }

            if (arrtime[2].Length == 1)
            {
                timestr = timestr + "0" + arrtime[2];
            }
            else
            {
                timestr = timestr + arrtime[2];
            }

            TextBox1.Text = timestr;
            TextBox2.Text = ViewState["storeorderid"].ToString();

            TextBox4.Text = admin;
            TextBox5.Text = storeOrderID;

            DataTable dtt = DBHelper.ExecuteDataTable("select Number,LogisticsCompany from Logistics");
            DropDownList3.DataTextField  = "LogisticsCompany";
            DropDownList3.DataValueField = "Number";
            DropDownList3.DataSource     = dtt;
            DropDownList3.DataBind();


            ////用于已出库的单不允许选择库位
            //SqlDataReader dr = DAL.DBHelper.ExecuteReader("select IsGeneOutBill,OutStorageOrderID from StoreOrder where StoreOrderID='" + Request.QueryString["StoreOrderID"] + "'");
            //if (dr.Read())
            //{
            //    if (dr["IsGeneOutBill"].ToString().ToLower() == "y")
            //    {
            //        SqlDataReader dr2 = DAL.DBHelper.ExecuteReader("select Note,inWareHouseID,inDepotSeatID from InventoryDoc where DocId='" + dr["OutStorageOrderID"] + "'");

            //        dr.Close();

            //        if (dr2.Read())
            //        {
            //            DropDownList1.SelectedValue = dr2["inWareHouseID"].ToString().Trim();


            //            string bdwareHouseID = DropDownList1.SelectedItem.Value;

            //            DropDownList2.DataSource = null;
            //            DropDownList2.DataTextField = "SeatName";
            //            DropDownList2.DataValueField = "DepotSeatID";
            //            DropDownList2.DataSource = CompanyConsignBLL.GetDepotSeat(bdwareHouseID);
            //            DropDownList2.DataBind();
            //        }

            //        TextBox6.Text = dr2["Note"].ToString();

            //        dr2.Close();

            //        DropDownList1.Enabled = false;
            //        DropDownList2.Enabled = false;
            //    }
            //}
        }
    }
예제 #6
0
    protected void loadData()
    {
        string storeOrderID = Request.QueryString["StoreOrderID"];

        Label1.Text = Request.QueryString["title"].ToString();
        string isEnabledDropDownList = Request.QueryString["enable"].ToString().Replace("'", "").Replace("-", "").Replace("/*", "");
        string isButton = Request.QueryString["isBut"].ToString().Replace("'", "").Replace("-", "").Replace("/*", "");

        if (isEnabledDropDownList == "Y")
        {
            DropDownList1.Enabled = false;
            DropDownList2.Enabled = false;

            fhck.Visible = false;
        }

        if (isButton == "CK")
        {
            TextBox3.Text = GetTran("001294", "订单出库");
        }
        else
        {
            Button1.Visible = false;
            TextBox3.Text   = GetTran("001711", "订单发货");
        }

        if (storeOrderID.EndsWith(","))
        {
            storeOrderID = storeOrderID.Substring(0, storeOrderID.Length - 1);
        }

        string allStoreOrderID = ("'" + storeOrderID + "'").Replace(",", "','");

        string sql = "select w.WareHouseid,d.DepotSeatid from storeorder s join city c on s.cpccode=c.cpccode join DepotSeat d on c.DepotSeatid=d.DepotSeatid join WareHouse w on d.WareHouseid=w.WareHouseid where storeorderid in(" + allStoreOrderID + ")";

        DataTable dt = BillOutOrderBLL.GetWareHouseName_Currency("1");

        if (dt.Rows.Count == 0)
        {
            Response.Write("<script>alert('" + GetTran("001293", "你没有仓库权限,所以不能查看此页面") + "')</script>");
            Response.End();
            return;
        }
        DropDownList1.DataSource = dt;
        DropDownList1.DataBind();

        string wareHouseID = DropDownList1.SelectedItem.Value;

        DropDownList2.DataSource = CompanyConsignBLL.GetDepotSeat(wareHouseID);
        DropDownList2.DataBind();

        string admin = Session["Company"].ToString();

        string[] arrtime = DateTime.Now.ToString("yyyy-MM-dd").Split('-');

        string timestr = arrtime[0];

        if (arrtime[1].Length == 1)
        {
            timestr = timestr + "0" + arrtime[1];
        }
        else
        {
            timestr = timestr + arrtime[1];
        }

        if (arrtime[2].Length == 1)
        {
            timestr = timestr + "0" + arrtime[2];
        }
        else
        {
            timestr = timestr + arrtime[2];
        }

        TextBox1.Text = timestr;
        TextBox2.Text = storeOrderID;

        TextBox4.Text = admin;
        TextBox5.Text = storeOrderID;

        string bind = "select p.productid,productcode,productname,quantity,price,pv ,outbillquantity,(quantity-outbillquantity) as [count] from orderdetail o " +
                      " join product p on o.productid=p.productid where storeorderid='" + Request.QueryString["StoreOrderID"] + "'";
        DataTable dt2 = DBHelper.ExecuteDataTable(bind);

        Repeater1.DataSource = dt2;
        Repeater1.DataBind();

        Translations();
    }