示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DMKM dMKM = db.DMKM.Find(id);

            db.DMKM.Remove(dMKM);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "ID,TenKM,TuKhoa,TieuDeSeo")] DMKM dMKM)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dMKM).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dMKM));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "ID,TenKM,TuKhoa,TieuDeSeo")] DMKM dMKM)
        {
            if (ModelState.IsValid)
            {
                db.DMKM.Add(dMKM);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dMKM));
        }
示例#4
0
        // GET: admin/DMKMs/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DMKM dMKM = db.DMKM.Find(id);

            if (dMKM == null)
            {
                return(HttpNotFound());
            }
            return(View(dMKM));
        }
示例#5
0
        public void showFormDanhMuc(string nameTag)
        {
            k++;
            Form frm = null;

            switch (nameTag)
            {
                #region Danh Muc Chung
            case "DMDT":
            {
                frm = new DMDT
                {
                    Text = "Danh mục đối tượng"
                };
                break;
            }

            case "DMKHO":
            {
                frm = new DMKHO
                {
                    Text = "Danh mục kho"
                };
                break;
            }

            case "DMKM":
            {
                frm = new DMKM
                {
                    Text = "Danh mục khoản mục"
                };
                break;
            }

            case "DMKV":
            {
                frm = new DMKV
                {
                    Text = "Danh mục khu vực"
                };
                break;
            }

            case "DMNHCCDC":
            {
                frm = new DMNHCCDC
                {
                    Text = "Danh mục nhóm công cụ dụng cụ"
                };
                break;
            }

            case "DMNDT":
            {
                frm = new DMNHDT
                {
                    Text = "Danh mục nhóm đối tượng"
                };
                break;
            }

            case "DMNHNV":
            {
                frm = new DMNHNV
                {
                    Text = "Danh mục nhóm nhân viên"
                };
                break;
            }

            case "DMNHSP":
            {
                frm = new DMNHSP
                {
                    Text = "Danh mục nhóm sản phẩm"
                };
                break;
            }

            case "DMNHVT":
            {
                frm = new DMNHVT
                {
                    Text = "Danh mục nhóm vật tư"
                };
                break;
            }

            case "DMNV":
            {
                frm = new DMNV
                {
                    Text = "Danh mục nhóm vật tư"
                };
                break;
            }

            case "DMNVU":
            {
                frm = new DMNVU
                {
                    Text = "Danh mục nghiệp vụ"
                };
                break;
            }

            case "DMTK":
            {
                frm = new DMTK
                {
                    Text = "Danh mục tài khoản"
                };
                break;
            }

            case "DMVT":
            {
                frm = new DMVT
                {
                    Text = "Danh mục vật tư"
                };
                break;
            }

            case "DMVTTS":
            {
                frm = new DMVTTS
                {
                    Text = "Danh mục vật tư tài sản"
                };
                break;
            }
                #endregion

                #region BanHangPhaiThu
            case "bcmh":
            {
                frm = new FBaoCaoMuaHang("bcmh")
                {
                    Text = "Báo cáo bán hàng"
                };
                break;
            }

            case "HDBH":
            {
                frm = new FBanHangPhaiThu
                {
                    Text = "Bán hàng phải thu"
                };
                break;
            }
                #endregion

                #region CpGiaThanh
            case "tgtp":
            {
                frm = new FKhaiBaoDinhMucSp();
                break;
            }
                #endregion

                #region HangTonKho.PhieuNhapThanhPham
            case "PNHAPTP":
            {
                frm = new FrPhieuNhapThanhPham
                {
                    Text = "Phiếu nhập thành phẩm"
                };
                break;
            }
                #endregion

                #region VonBangTien.PhieuThuChi
            case "PT":
            {
                frm = new FormPhieuThu("PT")
                {
                    Text = "Phiếu thu"
                };
                break;
            }

            case "PC":
            {
                frm = new FormPhieuThu("PC")
                {
                    Text = "Phiếu chi"
                };
                break;
            }

            case "BC":
            {
                frm = new FormPhieuThu("BC")
                {
                    Text = "Báo có ngân hàng"
                };
                break;
            }

            case "BN":
            {
                frm = new FormPhieuThu("BN")
                {
                    Text = "Báo nợ ngân hàng"
                };
                break;
            }
                #endregion
            }
            if (frm != null)
            {
                frm.Show();
                Hide();
            }
        }