Esempio n. 1
0
        public IRestResponse BaoCaoThongKe_LichSuBienDong_Save(LichSuBienDong lichSuBienDong)
        {
            var request = new RestRequest("BC/BaoCaoThongKe_LichSuBienDong_Save", Method.POST)
            {
                RequestFormat  = DataFormat.Json,
                JsonSerializer = new JsonSerializer(),
            };

            request.AddBody(new
            {
                lichSuBienDong
            });
            return(Execute(request));
        }
Esempio n. 2
0
        public bool BaoCaoThongKe_LichSuBienDong_Save(LichSuBienDong lichSuBienDong)
        {
            try
            {
                cons = new SqlConnection(BaoCaoThongKeConn);
                cons.Open();
                trans = cons.BeginTransaction();

                var insLichsubiendong = _lichSuBienDongRepository.BaoCaoThongKe_LichSuBienDong_Ins(lichSuBienDong, cons, trans);
                if (!insLichsubiendong)
                {
                    trans.Rollback(); return(false);
                }

                trans.Commit();
                return(true);
            }
            catch (Exception ex)
            {
                trans.Rollback();
                return(false);
            }
        }