예제 #1
0
        private void DealHuangHuo(bool isArgee)
        {
            ExchangeApplyInfo dataById = ExchangeApply.GetDataById(base.OpID);

            dataById.AdminRemark = WebUtils.GetString(this.bz.Text);
            dataById.Status      = (isArgee ? 1 : -1);
            if (base.Action.Equals(ActionType.Modify.ToString()))
            {
                if (ExchangeApply.Update(dataById))
                {
                    PageBase.log.AddEvent(base.LoginAccount.AccountName, string.Concat(new string[]
                    {
                        isArgee ? "同意" : "拒绝",
                        "订单[",
                        dataById.OrderNo,
                        "]的商品[",
                        dataById.GoodsName,
                        "]换货申请"
                    }));
                    base.Response.Redirect(string.Concat(new object[]
                    {
                        "ChangeGoods.aspx?CatalogID=",
                        base.CurrentCatalogID,
                        "&Module=",
                        base.CurrentModuleCode,
                        "&action=View"
                    }));
                }
                else
                {
                    base.ShowMsg("Thao tác thất bại");
                }
            }
        }
예제 #2
0
 protected void lnk_Delete_Click(object sender, System.EventArgs e)
 {
     if (!base.IsAuthorizedOp(ActionType.Delete.ToString()))
     {
         base.ShowAjaxMsg(this.UpdatePanel1, "Không có thẩm quyền");
     }
     else
     {
         int @int = WebUtils.GetInt((sender as LinkButton).CommandArgument);
         ExchangeApplyInfo dataById = ExchangeApply.GetDataById(@int);
         if (dataById == null)
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "Những thông tin này không được tìm thấy, các dữ liệu không tồn tại hoặc đã bị xóa");
         }
         else if (ExchangeApply.Delete(@int))
         {
             this.BindData();
             PageBase.log.AddEvent(base.LoginAccount.AccountName, string.Concat(new string[]
             {
                 "删除订单[",
                 dataById.OrderNo,
                 "]的商品[",
                 dataById.GoodsName,
                 "]换货申请"
             }));
             base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thành công");
         }
         else
         {
             base.ShowAjaxMsg(this.UpdatePanel1, "Thao tác thất bại");
         }
     }
 }
예제 #3
0
        public static int Add(ExchangeApplyInfo entity)
        {
            int result;

            if (entity == null)
            {
                result = 0;
            }
            else
            {
                result = BizBase.dbo.InsertModel <ExchangeApplyInfo>(entity);
            }
            return(result);
        }
예제 #4
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.apply = ExchangeApply.GetDataById(base.OpID);
         if (this.apply != null)
         {
             this.bz.Text = this.apply.AdminRemark;
             if (this.apply.Status != 0)
             {
                 this.btnok.Visible     = false;
                 this.btncancel.Visible = false;
             }
         }
     }
 }
예제 #5
0
 public static bool Update(ExchangeApplyInfo entity)
 {
     return(entity != null && BizBase.dbo.UpdateModel <ExchangeApplyInfo>(entity));
 }