public void getEdit() { string message = "{}"; try { string record = this.Request["record"]; Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record); List <ColumnInfo> parameters = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["keycolumns"].ToString()); tatcaldar obj = JavaScriptConvert.DeserializeObject <tatcaldar>(ht["params"].ToString()); List <tatclddtl> listDtl = JavaScriptConvert.DeserializeObject <List <tatclddtl> >(ht["dtlparams"].ToString()); List <string> listDeleted = JavaScriptConvert.DeserializeObject <List <string> >(ht["dtldeletedline"].ToString()); atcaldarBll bll = new atcaldarBll(); bll.UpdateCalendar(obj, listDtl, listDeleted); 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 getCldDtl() { try { string action = this.Request["action"]; if ((action != null) && (action == "generate")) { getAutoDtl(); return; } 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"]); atcaldarBll bll = new atcaldarBll(); int total = 0; List <object> dataList = bll.GetCalendarDetails(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 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()); atcaldarBll bll = new atcaldarBll(); int total = 0; List <object> obj = bll.GetCalendarDetails(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 getAutoDtl() { try { string record = this.Request["record"]; Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record); List <ColumnInfo> parameters = JavaScriptConvert.DeserializeObject <List <ColumnInfo> >(ht["params"].ToString()); atcaldarBll bll = new atcaldarBll(); List <object> dataList = bll.GetCalendarDetails(parameters); string json = JavaScriptConvert.SerializeObject(dataList); Response.Write("{results:" + dataList.Count + ",rows:" + json + "}"); } catch (Exception ex) { string message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_QueryFail, ex, true) + "'}"; Response.Output.Write(message); } }