public ActionResult Edit(PsckModel model) { var res = HandleResult(() => { model.id_masteruser = id_user_master; model.id_create = id_user; //model.id_shop = id_shop; return(BusinessFactory.Td_Ps_Ck_1.Update(model)); }); return(JsonString(res, 1)); }
public ActionResult Add(PsckModel model) { var res = HandleResult(() => { model.id_masteruser = id_user_master; model.id_create = id_user; //model.id_shop = id_shop; model.AutoAudit = AutoAudit(); var br = BusinessFactory.Td_Ps_Ck_1.Add(model); return(br); }); return(JsonString(res, 1)); }
private void GetIdShopSk(BaseResult res, PsckModel model) { Hashtable _ck_parm = new Hashtable(); //_ck_parm.Add("id_masteruser", model.id_masteruser); //_ck_parm.Add("id", model.id_shop_rk); //var shop = DAL.GetItem<Tb_Shop>(typeof(Tb_Shop), _ck_parm); //if (shop == null) //{ // res.Success = false; // res.Message.Add("入库门店已不存在!"); // return; //} //model.id_shop_sk = shop.id_shop_ps; //if (model.id_shop_sk.IsEmpty()) //{ // _ck_parm.Clear(); // _ck_parm.Add("id_masteruser", model.id_masteruser); // _ck_parm.Add("flag_state", 1); // _ck_parm.Add("flag_delete", 0); // _ck_parm.Add("id_shop_child", model.id_shop_rk); // var shopshop = DAL.GetItem<Tb_Shop_Shop>(typeof(Tb_Shop_Shop), _ck_parm); // if (shopshop != null && !shopshop.id_shop_father.IsEmpty()) // { // model.id_shop_sk = shopshop.id_shop_father; // } // else // { // res.Success = false; // res.Message.Add("入库门店上级关系缺失!"); // } //} _ck_parm.Add("id_masteruser", model.id_masteruser); _ck_parm.Add("flag_state", 1); _ck_parm.Add("flag_delete", 0); _ck_parm.Add("id_shop_child", model.id_shop_rk); var shopshop = DAL.GetItem <Tb_Shop_Shop>(typeof(Tb_Shop_Shop), _ck_parm); if (shopshop != null && !shopshop.id_shop_father.IsEmpty()) { model.id_shop_sk = shopshop.id_shop_father; } else { res.Success = false; res.Message.Add("入库门店上级关系缺失!"); } }