/// <summary> /// 保存操作 /// </summary> /// <param name="dotype"></param> /// <param name="aid"></param> /// <returns></returns> protected string save(string dotype, string aid) { Eyousoft_yhq.Model.GYSticket model = new Eyousoft_yhq.Model.GYSticket(); model.CusName = Utils.GetFormValue(contactname.UniqueID); model.CusSex = (sexType)Utils.GetInt(Utils.GetFormValue(dl_sex.UniqueID)); model.CusMob = Utils.GetFormValue(contactmob.UniqueID); model.PlaneTicket = Utils.GetFormValue(contacticket.UniqueID); model.Remark = Utils.GetFormValue(remark.UniqueID); model.OpertorID = HuiYuanInfo.UserID; string msg = ""; if (dotype == "add") { msg = new Eyousoft_yhq.BLL.GYSticket().Add(model) ? Utils.AjaxReturnJson("1", "新增成功!") : Utils.AjaxReturnJson("0", "新增失败!"); } else { model.ID = aid; var Tmodel = new Eyousoft_yhq.BLL.GYSticket().GetModel(model.ID); if (Tmodel != null) { model.payState = Tmodel.payState; model.orderState = Tmodel.orderState; } msg = new Eyousoft_yhq.BLL.GYSticket().Update(model) ? Utils.AjaxReturnJson("1", "修改成功!") : Utils.AjaxReturnJson("0", "修改失败!"); } return(msg); }
/// <summary> /// 保存操作 /// </summary> /// <param name="dotype"></param> /// <param name="aid"></param> /// <returns></returns> protected string save(string dotype, string aid) { Eyousoft_yhq.Model.GYSticket model = new Eyousoft_yhq.Model.GYSticket(); model.CusName = Utils.GetFormValue(contactname.UniqueID); model.CusSex = (sexType)Utils.GetInt(Utils.GetFormValue(dl_sex.UniqueID)); model.CusMob = Utils.GetFormValue(contactmob.UniqueID); model.PlaneTicket = Utils.GetFormValue(contacticket.UniqueID); model.Remark = Utils.GetFormValue(remark.UniqueID); model.OpertorID = HuiYuanInfo.UserID; string msg = ""; if (dotype == "add") { msg = new Eyousoft_yhq.BLL.GYSticket().Add(model) ? Utils.AjaxReturnJson("1", "新增成功!") : Utils.AjaxReturnJson("0", "新增失败!"); } else { model.ID = aid; var Tmodel = new Eyousoft_yhq.BLL.GYSticket().GetModel(model.ID); if (Tmodel != null) { model.payState = Tmodel.payState; model.orderState = Tmodel.orderState; } msg = new Eyousoft_yhq.BLL.GYSticket().Update(model) ? Utils.AjaxReturnJson("1", "修改成功!") : Utils.AjaxReturnJson("0", "修改失败!"); } return msg; }