Пример #1
0
        public void Action_SoPR(int action, int id, int idphongban, int sopr, int nam)
        {
            SoPR        spr = new SoPR();
            List <SoPR> tb  = spr.Action_SoPR(action, id, idphongban, sopr, nam);
            var         js  = new JavaScriptSerializer();

            Context.Response.Write(JsonConvert.SerializeObject(tb));
        }
Пример #2
0
        public void LaySoPR(int phongban, int nam)
        {
            SoPR sopr = new SoPR();

            sopr = sopr.LaySoPR(phongban, nam);
            var js = new JavaScriptSerializer();

            Context.Response.Write(JsonConvert.SerializeObject(sopr));
        }
Пример #3
0
        public void CheckSoPR(int sopr, int idphongban, int nam)
        {
            SoPR      po = new SoPR();
            DataTable tb = po.Check_SoPR(sopr, idphongban, nam);
            var       js = new JavaScriptSerializer();

            List <Dictionary <string, object> > parentRow = new List <Dictionary <string, object> >();
            Dictionary <string, object>         childRow;

            foreach (DataRow row in tb.Rows)
            {
                childRow = new Dictionary <string, object>();
                foreach (DataColumn col in tb.Columns)
                {
                    childRow.Add(col.ColumnName, row[col]);
                }
                parentRow.Add(childRow);
            }

            Context.Response.Write(JsonConvert.SerializeObject(parentRow));
        }