private bool DoEdit(int _id) { DateTime now = DateTime.Now; string note_no = now.ToString("yy") + now.ToString("MM") + now.ToString("dd") + now.ToString("HH") + now.ToString("mm") + now.ToString("ss"); bool result = false; ps_here_depot model = new ps_here_depot(); model.GetModel(_id); model.product_num = int.Parse(Litproduct_num.Text) - int.Parse(txtproduct_num.Text); ps_join_depot model1 = new ps_join_depot(); model1.product_category_id = model.product_category_id; model1.note_no = note_no; model1.add_time = DateTime.Now; model1.product_name = model.product_name; model1.product_code_state = "退货"; model1.go_price = model.go_price; model1.salse_price = model.salse_price; model1.user_id = Convert.ToInt32(Session["AID"]); model1.product_num = int.Parse(txtproduct_num.Text); model1.here_depot_id = _id; model1.dw = model.dw; model1.Add(); if (model.UpdateALL()) { mym.AddAdminLog("出库", "出库商品:" + txtproduct_name.Text); //记录日志 result = true; } return(result); }
private bool DoEdit(int _id) { bool result = false; ps_here_depot model = new ps_here_depot(); model.GetModel(_id); model.product_url = this.txtImgUrl.Text; model.product_category_id = int.Parse(ddlproduct_category_id.SelectedValue); model.product_name = txtproduct_name.Text; model.go_price = Convert.ToDecimal(this.txtgo_price.Text); model.salse_price = Convert.ToDecimal(this.txtsalse_price.Text); if (model.UpdateALL()) { mym.AddAdminLog("修改", "修改商品:" + txtproduct_name.Text); //记录日志 result = true; } return(result); }