Example #1
0
 protected void btnSave_OnClick(object sender, EventArgs e)
 {
     OrderInfo model = this.orderBll.GetModel((long) this.OrderId);
     model.ShippingStatus = 1;
     model.OrderStatus = 1;
     if (this.orderBll.Update(model))
     {
         Maticsoft.Model.Shop.Order.OrderAction action = new Maticsoft.Model.Shop.Order.OrderAction {
             ActionCode = "103",
             ActionDate = DateTime.Now,
             OrderCode = model.OrderCode,
             OrderId = model.OrderId,
             Remark = "供应商配货操作",
             UserId = base.CurrentUser.UserID,
             Username = base.CurrentUser.NickName
         };
         this.actionBll.Add(action);
         this.orderBll.RemoveModelInfoCache(model.OrderId);
         MessageBox.ShowSuccessTipScript(this, "操作成功!", "window.parent.location.reload();");
     }
     else
     {
         MessageBox.ShowFailTip(this, "操作失败!");
     }
 }
Example #2
0
 public Maticsoft.Model.Shop.Order.OrderAction DataRowToModel(DataRow row)
 {
     Maticsoft.Model.Shop.Order.OrderAction action = new Maticsoft.Model.Shop.Order.OrderAction();
     if (row != null)
     {
         if ((row["ActionId"] != null) && (row["ActionId"].ToString() != ""))
         {
             action.ActionId = long.Parse(row["ActionId"].ToString());
         }
         if ((row["OrderId"] != null) && (row["OrderId"].ToString() != ""))
         {
             action.OrderId = long.Parse(row["OrderId"].ToString());
         }
         if (row["OrderCode"] != null)
         {
             action.OrderCode = row["OrderCode"].ToString();
         }
         if ((row["UserId"] != null) && (row["UserId"].ToString() != ""))
         {
             action.UserId = int.Parse(row["UserId"].ToString());
         }
         if (row["Username"] != null)
         {
             action.Username = row["Username"].ToString();
         }
         if (row["ActionCode"] != null)
         {
             action.ActionCode = row["ActionCode"].ToString();
         }
         if ((row["ActionDate"] != null) && (row["ActionDate"].ToString() != ""))
         {
             action.ActionDate = DateTime.Parse(row["ActionDate"].ToString());
         }
         if (row["Remark"] != null)
         {
             action.Remark = row["Remark"].ToString();
         }
     }
     return action;
 }
Example #3
0
 protected void gridView_RowCommand(object sender, GridViewCommandEventArgs e)
 {
     if (e.CommandName == "CancelOrder")
     {
         long orderId = Globals.SafeLong(e.CommandArgument.ToString().Split(new char[] { ',' })[0].ToString(), (long) 0L);
         if (OrderManage.CancelOrder(this.orderBll.GetModel(orderId), base.CurrentUser))
         {
             MessageBox.ShowSuccessTip(this, "操作成功!");
         }
         else
         {
             MessageBox.ShowSuccessTip(this, "操作失败,请稍候再试!");
         }
     }
     if (e.CommandName == "Success")
     {
         object[] objArray2 = e.CommandArgument.ToString().Split(new char[] { ',' });
         long num2 = Globals.SafeLong(objArray2[0].ToString(), (long) 0L);
         string str = objArray2[1].ToString();
         if (this.orderBll.SetOrderSuccess(num2))
         {
             Maticsoft.Model.Shop.Order.OrderAction model = new Maticsoft.Model.Shop.Order.OrderAction {
                 ActionCode = "105",
                 ActionDate = DateTime.Now,
                 OrderCode = str,
                 OrderId = num2,
                 Remark = "供应商完成订单操作",
                 UserId = base.CurrentUser.UserID,
                 Username = base.CurrentUser.NickName
             };
             this.actionBll.Add(model);
             MessageBox.ShowSuccessTip(this, "操作成功!");
         }
         else
         {
             MessageBox.ShowSuccessTip(this, "操作失败,请稍候再试!");
         }
     }
     this.gridView.OnBind();
 }
Example #4
0
 protected void btnSave_OnClick(object sender, EventArgs e)
 {
     OrderInfo model = this.orderBll.GetModel((long) this.OrderId);
     if (model != null)
     {
         int num = this.RegionList.Region_iID;
         model.RegionId = new int?(num);
         model.ShipRegion = this.regionBll.GetRegionNameByRID(num);
         model.ShipName = this.txtShipName.Text;
         model.ShipAddress = this.txtShipAddress.Text;
         model.ShipTelPhone = this.txtShipTelPhone.Text;
         model.ShipCellPhone = this.txtShipCellPhone.Text;
         model.ShipZipCode = this.txtShipZipCode.Text;
         if (this.orderBll.Update(model))
         {
             Maticsoft.Model.Shop.Order.OrderAction action = new Maticsoft.Model.Shop.Order.OrderAction {
                 ActionCode = "106",
                 ActionDate = DateTime.Now,
                 OrderCode = model.OrderCode,
                 OrderId = model.OrderId,
                 Remark = "修改收货信息",
                 UserId = base.CurrentUser.UserID,
                 Username = base.CurrentUser.NickName
             };
             this.actionBll.Add(action);
             this.orderBll.RemoveModelInfoCache(model.OrderId);
             MessageBox.ShowSuccessTip(this, "操作成功!");
         }
         else
         {
             MessageBox.ShowFailTip(this, "操作失败!");
         }
     }
 }
Example #5
0
 protected void btnSave_OnClick(object sender, EventArgs e)
 {
     OrderInfo model = this.orderBll.GetModel((long) this.OrderId);
     int modeId = Globals.SafeInt(this.ddlShipType.SelectedValue, 0);
     Maticsoft.Model.Shop.Shipping.ShippingType modelByCache = this.typeBll.GetModelByCache(modeId);
     model.ExpressCompanyName = modelByCache.ExpressCompanyName;
     model.ExpressCompanyAbb = modelByCache.ExpressCompanyEn;
     model.ShippingModeId = new int?(modelByCache.ModeId);
     model.ShippingModeName = modelByCache.Name;
     model.RealShippingModeName = modelByCache.Name;
     model.ShipOrderNumber = this.txtShipOrderNumber.Text;
     model.FreightAdjusted = new decimal?(Globals.SafeDecimal(this.txtFreightAdjusted.Text, (decimal) 0M));
     model.FreightActual = new decimal?(Globals.SafeDecimal(this.txtFreightActual.Text, (decimal) 0M));
     int num2 = this.RegionList.Region_iID;
     model.RegionId = new int?(num2);
     model.ShipRegion = this.regionBll.GetRegionNameByRID(num2);
     model.ShipName = this.txtShipName.Text;
     model.ShipAddress = this.txtShipAddress.Text;
     model.ShipTelPhone = this.txtShipTelPhone.Text;
     model.ShipCellPhone = this.txtShipCellPhone.Text;
     model.ShippingStatus = 2;
     model.OrderStatus = 1;
     if (this.orderBll.UpdateShipped(model))
     {
         Maticsoft.Model.Shop.Order.OrderAction action = new Maticsoft.Model.Shop.Order.OrderAction {
             ActionCode = "104",
             ActionDate = DateTime.Now,
             OrderCode = model.OrderCode,
             OrderId = model.OrderId,
             Remark = "发货操作",
             UserId = base.CurrentUser.UserID,
             Username = base.CurrentUser.NickName
         };
         this.actionBll.Add(action);
         this.orderBll.RemoveModelInfoCache(model.OrderId);
         MessageBox.ShowSuccessTipScript(this, "操作成功!", "window.parent.location.reload();");
     }
     else
     {
         MessageBox.ShowFailTip(this, "操作失败!");
     }
 }