Exemplo n.º 1
0
        protected void LinkButton1_Click1(object sender, EventArgs e)
        {
            if (Session["Orders"] != null)
            {
                if (Session["DioSell_OrderFP"] != null)
                {
                    Sell_OrderFPService mailSer = new Sell_OrderFPService();
                    var model = mailSer.GetModel(Convert.ToInt32(Session["DioSell_OrderFP"]));
                    txtFPNo.Text     = model.FPNo;
                    txtPOName.Text   = model.POName;
                    txtPONo.Text     = model.PONo;
                    txtSupplier.Text = model.GuestName;

                    lblPID.Text = model.Id.ToString();

                    Sell_OrderFPsService sonSer = new Sell_OrderFPsService();
                    var sonList = sonSer.GetListArray(" ID=" + Session["DioSell_OrderFP"]);
                    List <Sell_OrderFPBacks> POOrders = new List <Sell_OrderFPBacks>();
                    foreach (var m in sonList)
                    {
                        Sell_OrderFPBacks fpModel = new Sell_OrderFPBacks();
                        fpModel.Good_Model         = m.Good_Model;
                        fpModel.GoodName           = m.GoodName;
                        fpModel.GoodNo             = m.GoodNo;
                        fpModel.GoodNum            = m.GoodNum;
                        fpModel.GoodPrice          = m.GoodPrice;
                        fpModel.GoodRemark         = model.Remark;
                        fpModel.GoodSellPrice      = m.GoodSellPrice;
                        fpModel.GoodSellPriceTotal = m.GoodSellPriceTotal;
                        fpModel.GoodSpec           = m.GoodSpec;
                        fpModel.GoodTypeSmName     = m.GoodTypeSmName;
                        fpModel.GoodUnit           = m.GoodUnit;
                        fpModel.GooId       = m.GooId;
                        fpModel.FPId        = m.Ids;
                        fpModel.SellOutPONO = "";
                        fpModel.Total       = m.Total;
                        POOrders.Add(fpModel);
                    }
                    Session["Orders"] = POOrders;
                    Session["Sell_OrderOutHousesViewSession"] = null;
                    gvList.DataSource = POOrders;
                    gvList.DataBind();
                }
            }
        }