public ActionResult ThongTinThemCapNhat(string Id) { var duLieuOutput = new CommonMenu.MenuOutput.ThongTin(); try { if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost(APIUrl.Menu.DocThongTin, input) as CommonOutput; if (output == null) { throw new Exception(Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <CommonMenu.MenuOutput.ThongTin>(output.DuLieu.ToString()); } } catch (Exception) { } return(PartialView("_PartialThemCapNhat", duLieuOutput)); }
public ActionResult ThemCapNhatMenu(string id) { ViewBag.DanhSachDonVi = DocDanhSachDonVi(); var danhsach = DocDanhSach("", 0, 0); var data = new MenuModel.MenuOutput.ThemCapNhatMenu(); data.DanhSachMenu = danhsach.DanhSach; var thongtin = new MenuModel.MenuOutput.ThongTin(); var outputDanhMucChucNang = DocDanhMucChucNang(); if (outputDanhMucChucNang != null) { data.DanhMucChucNang = outputDanhMucChucNang.DanhSach; } if (!string.IsNullOrEmpty(id)) { var input = new CommonInput.DocThongTinInput(); input.Id = id; var output = XuLyAPI.ApiJsonPost(APIUrl.Menu.DocThongTin, input) as CommonOutput; if (output.KetQua == 1) { thongtin = JsonConvert.DeserializeObject <MenuModel.MenuOutput.ThongTin>(output.DuLieu.ToString()); data.ThongTinMenu = thongtin; } } return(PartialView("_PartialThemCapNhat", data)); }
public ActionResult ThongTinThemCapNhat(string Id) { ViewBag.DanhSachLoaiPhanAnh = DanhSachLoaiPhanAnh(); var duLieuOutput = new PhanAnhNhanhModel.Output.ThongTin(); try { if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost(APIUrl.PhanAnhNhanh.DocThongTin, input) as CommonOutput; if (output == null) { throw new Exception(ConstantValues.Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <PhanAnhNhanhModel.Output.ThongTin>(output.DuLieu.ToString()); } } catch (Exception ex) { } return(PartialView("_ThemCapNhatPartial", duLieuOutput)); }
public ActionResult ThongTinThemCapNhatNhomTin(string Id) { var duLieuOutput = new Models.NhomTinModel.NhomTinOutput.ThongTin(); var DanhSachPhongBan = DocDanhSachDonVi(); ViewBag.IdPhongBan = new SelectList(DanhSachPhongBan, "Value", "Text", "Ma"); try { if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost2(APIUrl.LoaiBaoCao.DocThongTin, input, false) as CommonOutput; if (output == null) { throw new Exception(Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <Models.NhomTinModel.NhomTinOutput.ThongTin>(output.DuLieu.ToString()); } } catch (Exception) { } return(PartialView("_ThemCapNhatNhomTinPartial", duLieuOutput)); }
public ActionResult ThongTinThemCapNhat(string Id) { var duLieuOutput = new CommonPhanQuyen.PhanQuyenOutput.ThongTinPhanQuyen(); ViewBag.DanhSachChucNangXuLy = DocDanhSachChucNangXuLy(); ViewBag.DanhSachVaiTro = DocDanhSachVaiTro(); ViewBag.DanhSachDonVi = DocDanhSachDonVi(); ViewBag.DanhSachNhom = StaticList.NhomMenus(); ViewBag.DanhSachViTri = StaticList.ViTriMenus(); try { if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost(APIUrl.PhanQuyen.DocThongTin, input) as CommonOutput; if (output == null) { throw new Exception(ConstantValues.Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <CommonPhanQuyen.PhanQuyenOutput.ThongTinPhanQuyen>(output.DuLieu.ToString()); } else { var input = new CommonInput.DocDanhSach(); var output = XuLyAPI.ApiJsonPost(APIUrl.Menu.DocDanhSachCoPhanCap, input) as CommonOutput; if (output == null) { throw new Exception(ConstantValues.Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } var dsChucNang = JsonConvert.DeserializeObject <List <CommonPhanQuyen.PhanQuyenOutput.ThongTinPhanQuyen.ThongTinMenu> >(output.DuLieu.ToString()); duLieuOutput.DanhSachMenu = dsChucNang; } } catch (Exception) { } return(PartialView("_ThemCapNhatPartial", duLieuOutput)); }
public ActionResult ThongTinThemCapNhat(string Id) { TempData["returnUrl"] = Url.Action("Index", "NguoiDung", new { Areas = "NguoiDung" }); if (Session["UserInfo"] == null) { return(Redirect(ChucNang.DuongDan.DangNhap)); } if (!XuLyPhanQuyen.KiemTraQuyen(ChucNang.Ma.QuanLyTaiKhoan, QuyenHan.Ma.Them)) { return(Redirect(ChucNang.DuongDan.BangDieuKhien)); } var duLieuOutput = new CommonNguoiDung.NguoiDungOutput.ThongTin(); try { ViewBag.DanhSachVaiTro = DocDanhSachVaiTro(); ViewBag.DanhSachDonVi = DocDanhSachDonVi(); ViewBag.DanhSachPhanQuyen = DocDanhSachPhanQuyen(); ViewBag.DanhSachHuyen = XuLyTinhHuyenXa.DocDanhSachCacCap("Huyen"); if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost(APIUrl.NguoiDung.DocThongTin, input) as CommonOutput; if (output == null) { throw new Exception(ConstantValues.Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <CommonNguoiDung.NguoiDungOutput.ThongTin>(output.DuLieu.ToString()); } } catch (Exception) { } return(PartialView("_ThemCapNhatPartial", duLieuOutput)); }
public ActionResult ThongTinThemCapNhat(string Id) { var inputTinh = new TinhInput.DocDanhSach(); inputTinh.TuKhoa = ""; var outputTinh = XuLyAPI.ApiJsonPost(APIUrl.Tinh.DocDanhSachWeb, inputTinh) as CommonOutput; if (outputTinh != null && outputTinh.KetQua == 1 && outputTinh.DuLieu != null) { var dsTinh = JsonConvert.DeserializeObject <CommonTinh.TinhOutput.DocDanhSachWebHuyen>(outputTinh.DuLieu.ToString()); ViewBag.DanhSachTinh = dsTinh; } ViewBag.DanhSachHuyen = LayDuLieuHuyen(""); var duLieuOutput = new CommonXa.XaOutput.ThongTinTinhWeb(); try { if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost(APIUrl.Xa.DocThongTin, input) as CommonOutput; if (output == null) { throw new Exception(ConstantValues.Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <CommonXa.XaOutput.ThongTinTinhWeb>(output.DuLieu.ToString()); } } catch (Exception) { } return(PartialView("_ThemCapNhatPartial", duLieuOutput)); }
public ActionResult ThongTinThemCapNhatBaiViet(string Id) { var duLieuOutput = new Models.BaiVietModel.Output.ThongTin(); //if (string.IsNullOrEmpty(Id)) //{ // ViewBag.DanhSachPhongBan = DocDanhSachDonVi(); //} //else //{ // ViewBag.DanhSachNhomTin = DocDanhSachNhomTin(); //} ViewBag.DanhSachPhongBan = DocDanhSachDonVi(); ViewBag.DanhSachNhomTin = DocDanhSachNhomTin(); try { if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost2(APIUrl.BaiVietChoLanhDao.DocThongTin, input) as CommonOutput; if (output == null) { throw new Exception(Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <Models.BaiVietModel.Output.ThongTin>(output.DuLieu.ToString()); } } catch (Exception) { } return(PartialView("_ThemCapNhatBaiVietPartial", duLieuOutput)); }
public ActionResult ThongTinThemCapNhat(string Id) { var duLieuOutput = new CommonQuangCao.QuangCaoOutput.ThongTinQuangCao(); ViewBag.DanhSachDonVi = DocDanhSachDonVi(); var danhSachNenTang = StaticList.NenTangs(); ViewBag.DanhSachNenTang = danhSachNenTang; try { if (!string.IsNullOrEmpty(Id)) { var input = new CommonInput.DocThongTinInput { Id = Id }; var output = XuLyAPI.ApiJsonPost(APIUrl.QuangCao.DocThongTin, input) as CommonOutput; if (output == null) { throw new Exception(ConstantValues.Message.LoiServer); } if (output.KetQua != 1) { throw new Exception(output.ThongBao); } duLieuOutput = JsonConvert.DeserializeObject <CommonQuangCao.QuangCaoOutput.ThongTinQuangCao>(output.DuLieu.ToString()); if (!string.IsNullOrEmpty(duLieuOutput.MaNenTang)) { ViewBag.DanhSachLoai = DocDanhSachLoai(duLieuOutput.MaNenTang); } } } catch (Exception) { } return(PartialView("_ThemCapNhatPartial", duLieuOutput)); }