public ActionResult FormEdit_PhieuXuatKho([ModelBinder(typeof(DevExpressEditorsBinder))] EditableChungTu chungtu) { var userName = System.Web.HttpContext.Current.User.Identity.Name.ToString(); var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); ViewData["Madvql"] = Madvql; chungtu.Madvql = Madvql; if (!ModelState.IsValid) { return(DemoView("PhieuXuatKho", "FormEdit_Xuat", CCDCDataProvider.getChungtuXuats("X01", chungtu.STTCT))); } if (chungtu.STTCT == -1) { CCDCDataProvider.InsertChungTuXuat(chungtu); } else { CCDCDataProvider.UpdateChungTuXuat(chungtu); } var ob = CCDCDataProvider.getChungtuXuats("X00", chungtu.STTCT); return(DemoView("PhieuXuatKho", "FormEdit_Xuat", CCDCDataProvider.getChungtuXuats("X00", chungtu.STTCT))); // return RedirectToAction("FormEdit_Xuat"); }
public ActionResult DMCCDC() { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); return(DemoView("DMCCDC", CCDCDataProvider.listCCDCs(Madvql))); }
public ActionResult NewChiTietPartial(EditableCTChungTu chitiet) { var userName = System.Web.HttpContext.Current.User.Identity.Name.ToString(); var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); chitiet.STTCT = (int)Session["STTCT"]; chitiet.Madvql = Madvql; chitiet.MaCCDC = chitiet.TenCCDC.Split('-')[0]; chitiet.TenCCDC = chitiet.TenCCDC.Split('-')[1]; if (ModelState.IsValid) { try { CCDCDataProvider.InsertDetail(chitiet); } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Please, correct all errors."; } return(PartialView("CTChungTuNhapPartial", CCDCDataProvider.listCTChungtus(chitiet.STTCT))); }
public ActionResult UpdateNhapPartial(EditableCTChungTu chitiet) { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); var maDonVi = CCDCDataProvider.getMaDonVi_fromChiTietCT(Madvql, (int)Session["STTCT"]); chitiet.Madonvi = maDonVi; chitiet.STTCT = (int)Session["STTCT"]; chitiet.Madvql = Madvql; if (chitiet.NguonVon == "XDCB") { chitiet.MaCCDC = chitiet.TenCCDC.Split('-')[0] + "_XDCB"; } else { chitiet.MaCCDC = chitiet.TenCCDC.Split('-')[0]; } chitiet.TenCCDC = chitiet.TenCCDC.Split('-')[1]; if (ModelState.IsValid) { try { CCDCDataProvider.UpdateDetail(chitiet); } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Vui lòng nhập đầy nội dung trong (*)."; } return(PartialView("NhapDetailPartial", CCDCDataProvider.listCTChungtus(chitiet.STTCT))); }
public ActionResult PhieuXuatKhoPartial() { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); return(PartialView("PhieuXuatKhoPartial", CCDCDataProvider.PhieuXuatKhos(Madvql, "X00"))); }
public void Fill() { var Madonvis = CCDCDataProvider.listDonVis_byMadvql(MaDVQL).Select(p => p.Madonvi); foreach (string maDV in Madonvis) { if (maDV.StartsWith("BGĐ")) { continue; } if (maDV.StartsWith("NP")) { continue; } if (maDV.StartsWith("NH")) { continue; } if (maDV.StartsWith("NS")) { continue; } if (maDV.StartsWith("TB")) { continue; } if (maDV.StartsWith("PR-TC")) { continue; } Fill1(maDV); } }
public ActionResult GridLookup_XuatPartial(string MaCCDC) { ViewData["MaCCDC"] = MaCCDC; var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); string tenDonVi = CCDCDataProvider.getTenDvi_BySTTCT((int)Session["STTCT"]); string maDonvi = CCDCDataProvider.DMDonVis_byMaDonVi(Madvql, tenDonVi); string _newVariable = Request.Params["newVariable"]; if (string.IsNullOrEmpty(_newVariable)) { Session["newVariable"] = CCDCDataProvider.GetEditableCCDCs5(MaCCDC, Madvql, maDonvi); } else { Session["newVariable"] = _newVariable; } object result = new object(); if (Session["STTCT"] == null) { ViewData["CCDCs"] = CCDCDataProvider.GetEditableCCDC2s(Madvql); result = CCDCDataProvider.GetCCDC_ByMaCCDC(MaCCDC); } else { ViewData["CCDCs"] = CCDCDataProvider.GetEditableCCDCs4(Madvql, maDonvi); // result = CCDCDataProvider.GetCCDC_ByMaCCDCofDVi(Madvql, maDonvi); result = CCDCDataProvider.GetCCDC_ByMaCCDC(MaCCDC); } return(PartialView("GridLookup_XuatPartial", result)); }
public ActionResult DMDonvi() { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); return(DemoView("DMDonvi", CCDCDataProvider.GetEditableDMDonVis(Madvql))); }
public ActionResult PhieuXuatKho() { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); ViewData["Madvql"] = Madvql; return(DemoView("PhieuXuatKho", CCDCDataProvider.PhieuXuatKhos(Madvql, "X00"))); }
public ActionResult PhieuThanhLyPartial() { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); ViewData["Madvql"] = Madvql; return(PartialView("PhieuThanhLyPartial", CCDCDataProvider.PhieuThanhLys(Madvql, "X01"))); }
public ActionResult GridLookupPartial(string MaCCDC) { ViewData["MaCCDC"] = MaCCDC; ViewData["CCDCs"] = CCDCDataProvider.GetEditableCCDCs(); var result = CCDCDataProvider.GetCCDC_ByMaCCDC(MaCCDC); return(PartialView("GridLookupPartial", result)); // return PartialView("MultiColumnComboBoxPartial", result); // return PartialView(); }
public ActionResult FormEdit_PhieuNhapKho(int STTCT) { Session["STTCT"] = STTCT; EditableChungTu editCT = CCDCDataProvider.GetEditableChungtus(STTCT); if (editCT == null) { editCT = new EditableChungTu(); editCT.STTCT = -1; } return(DemoView("PhieuNhapKho", "FormEdit_Nhap", editCT)); }
public ActionResult FormEdit_PhieuXuatKho(int STTCT) { Session["STTCT"] = STTCT; var editCT = CCDCDataProvider.GetEditableChungtus(STTCT); var userName = System.Web.HttpContext.Current.User.Identity.Name.ToString(); var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); ViewData["Madvql"] = Madvql; if (editCT == null) { editCT = new EditableChungTu(); editCT.STTCT = -1; } return(DemoView("PhieuXuatKho", "FormEdit_Xuat", editCT)); }
public ActionResult DeleteXuatPartial(int STTCTCT) { var STTCT = (int)Session["STTCT"]; if (STTCTCT >= 0) { try { CCDCDataProvider.DeleteDetail(STTCT, STTCTCT); } catch (Exception e) { ViewData["EditError"] = e.Message; } } return(PartialView("XuatDetailPartial", CCDCDataProvider.listCTChungtus(STTCT))); }
public ActionResult UpdateThuHoiPartial(EditableCTChungTu chitiet) { var userName = System.Web.HttpContext.Current.User.Identity.Name.ToString(); var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); var maDonVi = CCDCDataProvider.getMaDonVi_fromChiTietCT(Madvql, (int)Session["STTCT"]); chitiet.Madonvi = maDonVi; chitiet.STTCT = (int)Session["STTCT"]; chitiet.Madvql = Madvql; if (chitiet.NguonVon == "XDCB") { chitiet.MaCCDC = chitiet.TenCCDC.Split('-')[0].Substring(0, 8) + "_XDCB"; } else { chitiet.MaCCDC = chitiet.TenCCDC.Split('-')[0]; } chitiet.TenCCDC = chitiet.TenCCDC.Split('-')[1]; //**// // ViewData["SoLuong"] = chitiet.TenCCDC.Split('-')[0]; //**// int _SL = Convert.ToInt32(Session["newVariable"]); if (chitiet.Soluong > _SL) { ViewData["EditError"] = "Không được nhập quá số lượng hiện có của đơn vị. SL đơn vị hiện có: " + Convert.ToString(Session["newVariable"]); return(PartialView("ThuHoiDetailPartial", CCDCDataProvider.listCTChungtus(chitiet.STTCT))); } if (ModelState.IsValid) { try { CCDCDataProvider.UpdateDetail(chitiet); } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Vui lòng nhập đầy nội dung trong (*)."; } return(PartialView("ThuHoiDetailPartial", CCDCDataProvider.listCTChungtus(chitiet.STTCT))); }
public ActionResult DeleteDonViPartial(int STTDMDV) { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); if (STTDMDV > 0) { try { CCDCDataProvider.DeleteDonVi(STTDMDV, Madvql); } catch (Exception e) { ViewData["EditError"] = e.Message; } } return(PartialView("DMDonviPartial", CCDCDataProvider.GetEditableDMDonVis(Madvql))); }
public ActionResult FormDelete_PhieuXuatKho(int STTCT) { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); if (STTCT >= 0) { try { CCDCDataProvider.DeleteChungTu(STTCT); // CCDCDataProvider.DeleteChitietCT(STTCT); } catch (Exception e) { ViewData["EditError"] = e.Message; } } return(DemoView("PhieuXuatKho", CCDCDataProvider.PhieuXuatKhos(Madvql, "X00"))); }
public ActionResult FormEdit_PhieuNhapKho([ModelBinder(typeof(DevExpressEditorsBinder))] EditableChungTu chungtu) { var userName = System.Web.HttpContext.Current.User.Identity.Name.ToString(); var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); chungtu.Maloaiphieu = "N00"; chungtu.Madvql = Madvql; if (!ModelState.IsValid) { return(DemoView("PhieuNhapKho", "FormEdit_Nhap", CCDCDataProvider.GetEditableChungtus(chungtu.STTCT))); } if (chungtu.STTCT == -1) { CCDCDataProvider.InsertChungTuNhap(chungtu); } else { CCDCDataProvider.UpdateChungTuNhap(chungtu); } chungtu.STTCT = (int)Session["STTCT"]; return(DemoView("PhieuNhapKho", "FormEdit_Nhap", CCDCDataProvider.GetEditableChungtus(chungtu.STTCT))); }
public ActionResult NewDonViPartial(EditableDonVi chitiet) { var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); chitiet.Madvql = Madvql; if (ModelState.IsValid) { try { CCDCDataProvider.InsertDonVi(chitiet); } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Please, correct all errors."; } return(PartialView("DMDonviPartial", CCDCDataProvider.GetEditableDMDonVis(Madvql))); }
public ActionResult NewCCDCPartial(EditableCCDC ccdc) { var userName = System.Web.HttpContext.Current.User.Identity.Name.ToString(); var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); ccdc.Madvql = Madvql; if (ModelState.IsValid) { try { CCDCDataProvider.InsertCCDC(ccdc); } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Please, correct all errors."; } return(PartialView("DMCCDCPartial", CCDCDataProvider.listCCDCs(Madvql))); }
public ActionResult NewThanhLyPartial(EditableCTChungTu chitiet) { var userName = System.Web.HttpContext.Current.User.Identity.Name.ToString(); var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); var maDonVi = CCDCDataProvider.getMaDonVi_fromChiTietCT(Madvql, (int)Session["STTCT"]); chitiet.Madonvi = maDonVi; chitiet.STTCT = (int)Session["STTCT"]; chitiet.SoCT = CCDCDataProvider.getSoCT(chitiet.STTCT); chitiet.Madvql = Madvql; if (chitiet.NguonVon == "XDCB") { chitiet.MaCCDC = chitiet.TenCCDC.Split('-')[0] + "_XDCB"; } else { chitiet.MaCCDC = chitiet.TenCCDC.Split('-')[0]; } chitiet.TenCCDC = chitiet.TenCCDC.Split('-')[1]; if (ModelState.IsValid) { try { CCDCDataProvider.InsertDetail(chitiet); } catch (Exception e) { ViewData["EditError"] = e.Message; } } else { ViewData["EditError"] = "Please, correct all errors."; } return(PartialView("ThanhLyDetailPartial", CCDCDataProvider.listCTChungtus(chitiet.STTCT))); }
public ActionResult GridLookupPartial(string MaCCDC) { ViewData["MaCCDC"] = MaCCDC; var userName = System.Web.HttpContext.Current.User.Identity.Name; var Madvql = CCDCDataProvider.GetMadvql_ByUserName(userName); string tenDonVi = CCDCDataProvider.getTenDvi_BySTTCT((int)Session["STTCT"]); string maDonvi = CCDCDataProvider.DMDonVis_byMaDonVi(Madvql, tenDonVi); object result = new object(); if (Session["STTCT"] == null) { ViewData["CCDCs"] = CCDCDataProvider.GetEditableCCDC2s(Madvql); result = CCDCDataProvider.GetCCDC_ByMaCCDC(MaCCDC); } else { // ViewData["CCDCs"] = CCDCDataProvider.GetEditableCCDCs3(Madvql, maDonvi); ViewData["CCDCs"] = CCDCDataProvider.GetEditableCCDC2s(Madvql); result = CCDCDataProvider.GetCCDC_ByMaCCDC(MaCCDC); } return(PartialView("GridLookupPartial", result)); }
public ActionResult PhieuNhapKhoPartial() { return(PartialView("PhieuNhapKhoPartial", CCDCDataProvider.PhieuNhapKhos())); }
public void getMaDVQL(string userName) { MaDVQL = CCDCDataProvider.GetMadvql_ByUserName(userName); }
public ActionResult XuatDetailPartial() { ViewData["STTCT"] = Session["STTCT"]; return(PartialView("XuatDetailPartial", CCDCDataProvider.listCTChungtus((int)Session["STTCT"]))); }
/***/ #region PhieuNhapKho public ActionResult PhieuNhapKho() { return(DemoView("PhieuNhapKho", CCDCDataProvider.PhieuNhapKhos())); }
public void getIDDonViCo(string userName) { IDDonVi = CCDCDataProvider.GetMadvql_ByUserName(userName); }
public void getTenDonViSD(string maDonViCo) { TenDonViSD = CCDCDataProvider.getTenDvi_ByID(maDonViCo); }
public ActionResult PhieuXuatKhoPartial() { return(PartialView("PhieuXuatKhoPartial", CCDCDataProvider.PhieuXuatKhos("X00"))); }
/****/ #region PhieuXuatKho public ActionResult PhieuXuatKho() { return(DemoView("PhieuXuatKho", CCDCDataProvider.PhieuXuatKhos("X00"))); }