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()); //tprpubrst obj = JavaScriptConvert.DeserializeObject<tprpubrst>(ht["params"].ToString()); List <tpraddrst> listDtl = JavaScriptConvert.DeserializeObject <List <tpraddrst> >(ht["dtlparams"].ToString()); praddrstBll bll = new praddrstBll(); bll.InsertAddRuleSet(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 exportexceldtl() { try { string record = this.Request["record"]; Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record); List <ColumnInfo> records = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["params"].ToString()); List <ColumnInfo> headers = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["headers"].ToString()); praddrstBll bll = new praddrstBll(); int total = 0; List <object> obj = bll.GetSelectedRecords <object>(records, false, 0, 0, ref total); if ((obj != null) && (total > 0)) { List <object> finalObj = obj.Cast <object>().ToList(); UtilExcel.ExportToExcel(finalObj[0].GetType(), Response, this.GetType().Name.GetPageName(), headers, finalObj); } } catch (Exception ex) { string message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_QueryFail, ex, true) + "'}"; Response.Output.Write(message); } }
public void getAddRuleSetDtl() { 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"]); praddrstBll bll = new praddrstBll(); int total = 0; List <object> dataList = bll.GetSelectedRecords <object>(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); } }
public void applyto() { string message; try { string record = this.Request["record"]; Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record); List <vw_employment> empParameters = JavaScriptConvert.DeserializeObject <List <vw_employment> >(ht["empparams"].ToString()); List <tpraddrst> obj = JavaScriptConvert.DeserializeObject <List <tpraddrst> >(ht["objparams"].ToString()); praddrstBll bll = new praddrstBll(); bll.ApplyTo(empParameters, obj); message = "{status:'success',msg:'" + HRMSRes.Public_Message_AddWell + "'}"; Response.Write(message); } catch (Exception ex) { message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_QueryFail, ex, true) + "'}"; Response.Output.Write(message); } }