当前位置: 首页>>代码示例>>C#>>正文


C# Bang.Delete方法代码示例

本文整理汇总了C#中Bang.Delete方法的典型用法代码示例。如果您正苦于以下问题:C# Bang.Delete方法的具体用法?C# Bang.Delete怎么用?C# Bang.Delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bang的用法示例。


在下文中一共展示了Bang.Delete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Delete_ChungTu

        /// <summary>
        /// Xóa dữ liệu chỉ tiêu
        /// </summary>
        /// <param name="iID_MaChungTu"></param>
        /// <param name="IPSua"></param>
        /// <param name="MaNguoiDungSua"></param>
        /// <returns></returns>
        public static int Delete_ChungTu(String iID_MaChungTu, String IPSua, String MaNguoiDungSua)
        {
            SqlCommand cmd;
            //Xóa dữ liệu trong bảng TCDN_ChungTuChiTiet
            //kiem tra du lieu bang TCDN_ChungTuChiTiet
            String SQL = "SELECT COUNT(*) FROM TCDN_ChungTuChiTiet WHERE [email protected]_MaChungTu";
            cmd = new SqlCommand(SQL);
            cmd.Parameters.AddWithValue("@iID_MaChungTu", iID_MaChungTu);
            int check =Convert.ToInt32(Connection.GetValue(cmd, 1));
            if (check == 0)
            {
                cmd = new SqlCommand("DELETE FROM TCDN_ChungTuChiTiet WHERE [email protected]_MaChungTu");
                cmd.Parameters.AddWithValue("@iID_MaChungTu", iID_MaChungTu);
                Connection.UpdateDatabase(cmd);
                cmd.Dispose();

                //Xóa dữ liệu trong bảng TCDN_ChungTu
                Bang bang = new Bang("TCDN_ChungTu");
                bang.MaNguoiDungSua = MaNguoiDungSua;
                bang.IPSua = IPSua;
                bang.GiaTriKhoa = iID_MaChungTu;
                bang.Delete();
                return 1;
            }
            else
                return 0;
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:34,代码来源:TCDN_ChungTuModels.cs

示例2: Delete

 public ActionResult Delete(String iID_MaSanPham)
 {
     Bang bang = new Bang("DM_SanPham");
     bang.GiaTriKhoa = iID_MaSanPham;
     bang.Delete();
     return RedirectToAction("Index", new {});
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:7,代码来源:SanPhamController.cs

示例3: Delete_ChungTu

        /// <summary>
        /// Xóa dữ liệu chỉ tiêu
        /// </summary>
        /// <param name="iID_MaChungTu"></param>
        /// <param name="IPSua"></param>
        /// <param name="MaNguoiDungSua"></param>
        /// <returns></returns>
        public static int Delete_ChungTu(String iID_MaChungTu, String sIPSua, String sID_MaNguoiDungSua)
        {
            DataTable dt = GetChungTu(iID_MaChungTu);
            int iID_MaTrangThaiDuyet = Convert.ToInt32(dt.Rows[0]["iID_MaTrangThaiDuyet"]);
            String MaND = Convert.ToString(dt.Rows[0]["sID_MaNguoiDungTao"]);

            //Phuonglt yêu cầu cấp trợ lý tổng hợp được xóa tất cả cấp trợ lý phòng ban, tài khoản nào thuộc cấp trợ lý phòng ban
            // thì chỉ được xóa chứng từ của tài khoản đó tạo
            if ((sID_MaNguoiDungSua == MaND || LuongCongViecModel.KiemTra_TroLyTongHop(sID_MaNguoiDungSua)) && LuongCongViecModel.KiemTra_TrangThaiKhoiTao(CongSanModels.iID_MaPhanHe, iID_MaTrangThaiDuyet))
            {
                //Xóa dữ liệu trong bảng KTCS_ChungTuChiTiet
                SqlCommand cmd;
                cmd = new SqlCommand("UPDATE KTCS_ChungTuChiTiet SET iTrangThai=0, [email protected], [email protected]_MaNguoiDungSua WHERE [email protected]_MaChungTu");
                cmd.Parameters.AddWithValue("@iID_MaChungTu", iID_MaChungTu);
                cmd.Parameters.AddWithValue("@sIPSua", sIPSua);
                cmd.Parameters.AddWithValue("@sID_MaNguoiDungSua", sID_MaNguoiDungSua);
                Connection.UpdateDatabase(cmd);
                cmd.Dispose();

                //Xóa dữ liệu trong bảng KT_ChungTu
                Bang bang = new Bang("KTCS_ChungTu");
                bang.MaNguoiDungSua = sID_MaNguoiDungSua;
                bang.IPSua = sIPSua;
                bang.GiaTriKhoa = iID_MaChungTu;
                bang.Delete();

                dt.Dispose();
            }
            return 1;
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:37,代码来源:KTCS_ChungTuModels.cs

示例4: Delete

 public ActionResult Delete(String iID_MaChiTietGia, String iID_MaSanPham)
 {
     Bang bang = new Bang("DM_SanPham_ChiTietGia");
     bang.GiaTriKhoa = iID_MaChiTietGia;
     bang.Delete();
     return RedirectToAction("Index", new { iID_MaSanPham = iID_MaSanPham });
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:7,代码来源:SP_ChiTietGiaController.cs

示例5: Delete_Gom

        public ActionResult Delete_Gom(String iID_MaChungTu, String sLNS)
        {
            if (BaoMat.ChoPhepLamViec(User.Identity.Name, "DT_ChungTu_TLTH", "Delete") == false)
            {
                return RedirectToAction("Index", "PermitionMessage");
            }
            Bang bang = new Bang("DT_ChungTu_TLTH");
            bang.GiaTriKhoa = iID_MaChungTu;
            bang.Delete();

            //update lai trang thai check bang chung tu

            String iID_MaChungTu_ChungTu = Convert.ToString(CommonFunction.LayTruong("DT_ChungTu_TLTH", "iID_MaChungTu_TLTH", iID_MaChungTu, "iID_MaChungTu"));
            String DK = "";
            String[] arrChungtu = iID_MaChungTu_ChungTu.Split(',');
            SqlCommand cmd = new SqlCommand();
            for (int j = 0; j < arrChungtu.Length; j++)
            {
                DK += " iID_MaChungTu [email protected]_MaChungTu" + j;
                if (j < arrChungtu.Length - 1)
                    DK += " OR ";
                cmd.Parameters.AddWithValue("@iID_MaChungTu" + j, arrChungtu[j]);

            }
            String SQL = @"UPDATE DT_ChungTu SET iCheck=0 WHERE iTrangThai=1 AND (" + DK + ")";
            cmd.CommandText = SQL;
            Connection.UpdateDatabase(cmd);
            cmd.Dispose();
            if (sLNS == "1040100")
                return RedirectToAction("Index", "DuToan_ChungTu_BaoDam", new { iLoai = 1, sLNS = sLNS });
            return RedirectToAction("Index", "DuToan_ChungTu", new { iLoai = 1, sLNS = sLNS });
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:32,代码来源:DuToan_ChungTuController.cs

示例6: Delete

 public ActionResult Delete(String iID_MaDoanhNghiep)
 {
     Bang bang = new Bang("TCDN_DoanhNghiep");
     bang.GiaTriKhoa = iID_MaDoanhNghiep;
     bang.Delete();
     return RedirectToAction("Index", "TCDN_HoSo_DoanhNghiep");
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:7,代码来源:TCDN_HoSo_DoanhNghiepController.cs

示例7: Delete_LinhVuc

        public ActionResult Delete_LinhVuc(String iID_MaDoanhNghiep, String iID_Ma)
        {
            Bang bang = new Bang("TCDN_LinhVuc");
            bang.GiaTriKhoa = iID_Ma;
            bang.Delete();

            return RedirectToAction("Edit", "TCDN_HoSo_DoanhNghiep", new { iID_MaDoanhNghiep = iID_MaDoanhNghiep, iLoai = 2 });
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:8,代码来源:TCDN_HoSo_DoanhNghiepController.cs

示例8: Delete_CongTyLDLK

        public ActionResult Delete_CongTyLDLK(String iID_MaDoanhNghiep, String iID_Ma)
        {
            Bang bang = new Bang("TCDN_CongTyLienDoanhLienKet");
            bang.GiaTriKhoa = iID_Ma;
            bang.Delete();

            return RedirectToAction("Edit", "TCDN_HoSo_DoanhNghiep", new { iID_MaDoanhNghiep = iID_MaDoanhNghiep, iLoai = 4 });
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:8,代码来源:TCDN_HoSo_DoanhNghiepController.cs

示例9: Delete

 public ActionResult Delete(string iID_MaBangLuongChiTiet)
 {
     Bang bang = new Bang("L_BangLuongChiTiet");
     bang.MaNguoiDungSua = User.Identity.Name;
     bang.IPSua = Request.UserHostAddress;
     bang.GiaTriKhoa = iID_MaBangLuongChiTiet;
     bang.Delete();
     return RedirectToAction("Index", "BangLuong");
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:9,代码来源:Luong_BangLuongChiTietController.cs

示例10: Delete

 public static Boolean Delete(String iID_MaChiTieu)
 {
     Boolean vR = false;
     Bang bang = new Bang("TCDN_ChiTieu");
     bang.GiaTriKhoa = iID_MaChiTieu;
     bang.Delete();
     vR = true;
     return vR;
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:9,代码来源:TCDN_ChiTieuModels.cs

示例11: Delete

 public ActionResult Delete(string iID, int? page)
 {
     Bang bang = new Bang("NS_MucLucNganSach_Nganh");
     bang.GiaTriKhoa = iID;
     bang.IPSua = Request.UserHostAddress;
     bang.MaNguoiDungSua = User.Identity.Name;
     bang.Delete();
     return RedirectToAction("index", new { page = page });
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:9,代码来源:DanhMucNganhController.cs

示例12: Delete

 public ActionResult Delete(string iID_MaNgachLuong)
 {
     Bang bang = new Bang("L_DanhMucNgachLuong");
     bang.MaNguoiDungSua = User.Identity.Name;
     bang.IPSua = Request.UserHostAddress;
     bang.GiaTriKhoa = iID_MaNgachLuong;
     bang.Delete();
     return RedirectToAction("Index", "Luong_DanhMucNgachLuong");
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:9,代码来源:Luong_DanhMucNgachLuongController.cs

示例13: Delete

 public ActionResult Delete(String MaPhanHe_TrangThaiDuyet_Xem)
 {
     if (BaoMat.ChoPhepLamViec(User.Identity.Name, "NS_PhanHe_TrangThaiDuyet_NhomNguoiDung", "Delete") == false || !HamChung.CoQuyenXemTheoMenu(Request.Url.AbsolutePath, User.Identity.Name))
     {
         return RedirectToAction("Index", "PermitionMessage");
     }
     Bang bang = new Bang("NS_PhanHe_TrangThaiDuyet_NhomNguoiDung");
     bang.GiaTriKhoa = MaPhanHe_TrangThaiDuyet_Xem;
     bang.Delete();
     return View(sViewPath + "PhanHe_TrangThaiDuyet_NhomNguoiDung_Index.aspx");
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:11,代码来源:PhanHe_TrangThaiDuyet_NhomNguoiDungController.cs

示例14: Delete

 public ActionResult Delete(String MaTaiLieu)
 {
     if (BaoMat.ChoPhepLamViec(User.Identity.Name, "TL_Anh", "Edit") == false)
     {
         return RedirectToAction("Index", "PermitionMessage");
     }
     Bang bang = new Bang("TL_Anh");
     bang.GiaTriKhoa = MaTaiLieu;
     bang.Delete();
     return RedirectToAction("Index");
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:11,代码来源:TuLieu_HinhAnhController.cs

示例15: Delete

 public ActionResult Delete(String iID_MaChuongTrinhMucTieu)
 {
     if (BaoMat.ChoPhepLamViec(User.Identity.Name, "KT_ChuongTrinhMucTieu", "Delete") == false)
     {
         return RedirectToAction("Index", "PermitionMessage");
     }
     Bang bang = new Bang("KT_ChuongTrinhMucTieu");
     bang.GiaTriKhoa = iID_MaChuongTrinhMucTieu;
     bang.Delete();
     return View(sViewPath + "ChuongTrinhMucTieu_Index.aspx");
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:11,代码来源:KTCT_KhoBac_ChuongTrinhMucTieuController.cs


注:本文中的Bang.Delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。