public void getNew() { string message = "{}"; try { string record = this.Request["record"]; Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record); List <ColumnInfo> parameters = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["keycolumns"].ToString()); List <tlvdfbyyr> listDtl = JavaScriptConvert.DeserializeObject <List <tlvdfbyyr> >(ht["dtlparams"].ToString()); lvdfbyyearsBll bll = new lvdfbyyearsBll(); bll.InsertDef(listDtl); message = "{status:'success',msg:'" + HRMSRes.Public_Message_EditWell + "'}"; } catch (Exception ex) { message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_EditBad, ex, true) + "'}"; } Response.Write(message); }
public void getDefDtl() { try { string record = this.Request["record"]; Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record); List <ColumnInfo> list = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["params"].ToString()); int start = Convert.ToInt32(this.Request["start"]); int limit = Convert.ToInt32(this.Request["limit"]); lvdfbyyearsBll bll = new lvdfbyyearsBll(); int total = 0; List <object> dataList = bll.GetDefDetails(list, true, start, start + limit, ref total); string json = JavaScriptConvert.SerializeObject(dataList); Response.Write("{results:" + total + ",rows:" + json + "}"); } catch (Exception ex) { string message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_QueryFail, ex, true) + "'}"; Response.Output.Write(message); } }