/// <summary> /// 修改库存 /// </summary> /// <param name="context"></param> private void update(HttpContext context) { string json = ""; TBL_DEPARTMENT_INOROUTRECORD model = new TBL_DEPARTMENT_INOROUTRECORD(); model.department_inoroutrecordid = context.Request["department_inoroutrecordid"]; model.inorout = context.Request["inorout"]; model.inoroutdate = context.Request["inoroutdate"]; model.handleperson = context.Request["handleperson"]; model.processnumber = context.Request["processnumber"]; model.pickingperson = context.Request["pickingperson"]; try { Bll.Update(model); json = "{IsSuccess:'true',Message:'保存成功!'}"; } catch { json = "{IsSuccess:'false',Message:'保存失败!'}"; } // context.Response.ContentType = "application/json"; //返回JSON结果 context.Response.Write(json); context.Response.End(); }
/// <summary> /// 新增库存 /// </summary> /// <param name="context"></param> private void add(HttpContext context) { string json = ""; TBL_DEPARTMENT_INOROUTRECORD model = new TBL_DEPARTMENT_INOROUTRECORD(); model.department_inoroutrecordid = System.Guid.NewGuid().ToString().ToUpper(); model.inorout = context.Request["inorout"]; model.inoroutdate = context.Request["inoroutdate"]; model.handleperson = context.Request["handleperson"]; model.processnumber = context.Request["processnumber"]; model.pickingperson = context.Request["pickingperson"]; try { Bll.Add(model); json = "{IsSuccess:'true',Message:'保存成功!'}"; } catch { json = "{IsSuccess:'false',Message:'保存失败!'}"; } context.Response.Write(json); context.Response.End(); }