Ejemplo n.º 1
0
        public void LayDS_PRChiTiet_DaDuyet(int id_phongban)
        {
            PR_ChiTiet        pr_chitiet = new PR_ChiTiet();
            List <PR_ChiTiet> tb         = pr_chitiet.LayDanhSachPR_ChTiet_DaDuyet(id_phongban);
            var js = new JavaScriptSerializer();

            Context.Response.Write(JsonConvert.SerializeObject(tb));
        }
Ejemplo n.º 2
0
        public void ActionPR_ChiTiet(int action, int id, int idpr, string mahang, string tenhang, string dvt, int tonkho, int soluongyeucau, double dongia, int tigia, double thanhtientamung, string nhacungcap, int tinhtrangvattu, string ngaycanhang, string thoigiansudung, string congdung, int leadtime, int nhommuaid, string nhommuaname, int vat, bool gianhaptay)
        {
            PR_ChiTiet        pr_chitiet = new PR_ChiTiet();
            List <PR_ChiTiet> tb         = pr_chitiet.LayDanhSachPR_ChTiet(action, id, idpr, mahang, tenhang, dvt, tonkho, soluongyeucau, dongia, tigia, thanhtientamung, nhacungcap, tinhtrangvattu, ngaycanhang, thoigiansudung, congdung, leadtime, nhommuaid, nhommuaname, vat, gianhaptay);
            var js = new JavaScriptSerializer();

            Context.Response.Write(JsonConvert.SerializeObject(tb));
        }
Ejemplo n.º 3
0
        public void UpdateNguoiMuaHang(int id_pr_chitiet, string nguoimuahang)
        {
            PR_ChiTiet pr_chitiet = new PR_ChiTiet();
            DataTable  tb         = pr_chitiet.UpdateNguoiMuaHang(id_pr_chitiet, nguoimuahang);
            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));
        }