/// <summary> /// 新增开拓掘进日记录 /// </summary> /// <param name="context"></param> private void add(HttpContext context) { string json = ""; TBL_TUNNELLINGDAILYRECORD model = new TBL_TUNNELLINGDAILYRECORD(); model.tunnellingdailyrecordid = System.Guid.NewGuid().ToString().ToUpper(); model.organizationid = context.Request["organizationid"]; model.miningwellprojectid = context.Request["miningwellprojectid"]; model.daycompletion = Convert.ToDecimal(context.Request["daycompletion"]); model.addupcompletion = Convert.ToDecimal(context.Request["addupcompletion"]); try { Bll.Add(model); json = "{IsSuccess:'true',Message:'保存成功!'}"; } catch { json = "{IsSuccess:'false',Message:'保存失败!'}"; } context.Response.Write(json); context.Response.End(); }
/// <summary> /// 修改开拓掘进日记录 /// </summary> /// <param name="context"></param> private void update(HttpContext context) { string json = ""; TBL_TUNNELLINGDAILYRECORD model = new TBL_TUNNELLINGDAILYRECORD(); model.tunnellingdailyrecordid = context.Request["Tunnellingdailyrecordid"]; model.organizationid = context.Request["organizationid"]; model.miningwellprojectid = context.Request["miningwellprojectid"]; model.daycompletion = Convert.ToDecimal(context.Request["daycompletion"]); model.addupcompletion = Convert.ToDecimal(context.Request["addupcompletion"]); 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(); }