示例#1
0
        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());

                tlvdfbyot        obj     = JavaScriptConvert.DeserializeObject <tlvdfbyot>(ht["params"].ToString());
                List <tlvdfbyod> listDtl = JavaScriptConvert.DeserializeObject <List <tlvdfbyod> >(ht["dtlparams"].ToString());

                lvdfbyotBll bll = new lvdfbyotBll();

                bll.InsertDef(obj, 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);
        }
示例#2
0
        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"]);

                lvdfbyotBll bll = new lvdfbyotBll();

                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);
            }
        }