Ejemplo n.º 1
0
        public void listBoardMessage()
        {
            try
            {
                string record = this.Request["record"];

                //Hashtable ht = JavaScriptConvert.DeserializeObject<Hashtable>(record);
                //List<ColumnInfo> list = JavaScriptConvert.DeserializeObject<List<ColumnInfo>>(ht["params"].ToString());
                List <ColumnInfo> list = new List <ColumnInfo>()
                {
                    new ColumnInfo()
                    {
                        ColumnName = "reci", ColumnValue = Function.GetCurrentStaff()
                    }
                };

                int start = Convert.ToInt32(this.Request["start"]);
                int limit = Convert.ToInt32(this.Request["limit"]);

                int total = 0;

                staldlybBll bll = new staldlybBll();

                List <tstaldlyb> dataList = bll.GetSelectedRecords <tstaldlyb>(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);
            }
        }
Ejemplo n.º 2
0
        public void handleMesssage()
        {
            try
            {
                string record = this.Request["record"];

                Hashtable ht = JavaScriptConvert.DeserializeObject <Hashtable>(record);

                staldlybBll bll = new staldlybBll();
                bll.HandleMesssage(ht["adid"].ToString());

                Response.Write("{status:'success',msg:'Message handled success.'}");
            }
            catch (Exception ex)
            {
                string message = "{status:'failure',msg:'" + ExceptionPaser.Parse(HRMSRes.Public_Message_QueryFail, ex, true) + "'}";
                Response.Output.Write(message);
            }
        }