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


C# Bang类代码示例

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


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

示例1: 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

示例2: Update_objVTNCC

        public static object Update_objVTNCC(String ck, String iID_MaVatTu, String iID_MaNhaCungCap, String sID_MaNguoiDungSua, String IPSua)
        {
            try
            {
                if (ck == "true")
                {
                    if (iID_MaVatTu != "" && iID_MaNhaCungCap != "")
                    {
                        Bang bang = new Bang("DM_VatTu_NhaCungCap");
                        bang.DuLieuMoi = true;
                        bang.CmdParams.Parameters.AddWithValue("@iID_MaVatTu", iID_MaVatTu);
                        bang.CmdParams.Parameters.AddWithValue("@iID_MaNhaCungCap", iID_MaNhaCungCap);
                        bang.MaNguoiDungSua = sID_MaNguoiDungSua;
                        bang.IPSua = IPSua;
                        bang.Save();
                        //cmd = new SqlCommand("INSERT INTO DM_NhaCungCap()iID_MaVatTu FROM DM_VatTu WHERE sMaVatTu = @sMaVatTu");
                    }
                }
                else
                {
                    SqlCommand cmd = new SqlCommand("DELETE  FROM DM_VatTu_NhaCungCap WHERE iID_MaVatTu = @iID_MaVatTu AND " +
                                                      "iID_MaNhaCungCap = @iID_MaNhaCungCap");
                    cmd.Parameters.AddWithValue("@iID_MaVatTu", iID_MaVatTu);
                    cmd.Parameters.AddWithValue("@iID_MaNhaCungCap", iID_MaNhaCungCap);
                    Connection.UpdateDatabase(cmd);
                    cmd.Dispose();
                }
            }
            catch
            {}

            return null;
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:33,代码来源:MaVatTuController.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_MaSanPham)
 {
     Bang bang = new Bang("DM_SanPham");
     bang.GiaTriKhoa = iID_MaSanPham;
     bang.Delete();
     return RedirectToAction("Index", new {});
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:7,代码来源:SanPhamController.cs

示例5: 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

示例6: EditSubmit

        public ActionResult EditSubmit(String ParentID)
        {
            if (BaoMat.ChoPhepLamViec(User.Identity.Name, " DM_SanPham_CauHinhDonVi", "Edit") == false)
            {
                return RedirectToAction("Index", "PermitionMessage");
            }
            String iID_MaDonVi = Convert.ToString(Request.Form[ParentID + "_iID_MaDonVi"]);
            String SQL = "SELECT COUNT(iID_MaDonVi) AS SoBanGhi FROM DM_SanPham_CauHinhDonVi WHERE iID_MaDonVi = @iID_MaDonVi";
            SqlCommand cmd = new SqlCommand(SQL);
            cmd.Parameters.AddWithValue("@iID_MaDonVi", iID_MaDonVi);
            int SoBanGhi = (int)Connection.GetValue(cmd, -1);
            if (SoBanGhi > 0)
            {
                String DelSQL = "DELETE DM_SanPham_CauHinhDonVi WHERE iID_MaDonVi = @iID_MaDonVi";
                cmd.CommandText = DelSQL;
                SqlConnection conn = new SqlConnection(Connection.ConnectionString);
                conn.Open();
                cmd.Connection = conn;
                cmd.ExecuteNonQuery();
                conn.Dispose();
            }

            Bang bang = new Bang("DM_SanPham_CauHinhDonVi");
            bang.MaNguoiDungSua = User.Identity.Name;
            bang.IPSua = Request.UserHostAddress;
            bang.TruyenGiaTri(ParentID, Request.Form);
            bang.DuLieuMoi = true;
            bang.Save();
            return RedirectToAction("Index", new { iID_MaDonVi = iID_MaDonVi });
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:30,代码来源:SanPham_CauHinhDonViController.cs

示例7: 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

示例8: ChiTiet_Submit

 public ActionResult ChiTiet_Submit(String ParentID)
 {
     Bang bang = new Bang("KTCS_TaiSanChiTiet");
     bang.MaNguoiDungSua = User.Identity.Name;
     bang.IPSua = Request.UserHostAddress;
     bang.TruyenGiaTri(ParentID, Request.Form);
     String dNgayMua = Convert.ToString(Request.Form[ParentID + "_vidNgayMua"]);
     String dNgayKhauHao = Convert.ToString(Request.Form[ParentID + "_vidNgayDuaVaoKhauHao"]);
     String iID_MaTaiSan = Request.Form[ParentID + "_iID_MaTaiSan"];
     DataTable dt =KTCS_TaiSanModels.Get_dtTaiSan(iID_MaTaiSan);
     bang.CmdParams.Parameters.AddWithValue("dNgayMua", CommonFunction.LayNgayTuXau(dNgayMua));
     bang.CmdParams.Parameters.AddWithValue("dNgayKhauHao", CommonFunction.LayNgayTuXau(dNgayKhauHao));
     bang.Save();
     String SQL = "UPDATE KTCS_TaiSan SET [email protected],[email protected] WHERE [email protected]_MaTaiSan";
     SqlCommand cmd = new SqlCommand(SQL);
     cmd.Parameters.AddWithValue("@dNgayMua", CommonFunction.LayNgayTuXau(dNgayMua));
     cmd.Parameters.AddWithValue("@dNgayDuaVaoKhauHao", CommonFunction.LayNgayTuXau(dNgayKhauHao));
     cmd.Parameters.AddWithValue("@iID_MaTaiSan", iID_MaTaiSan);
     Connection.UpdateDatabase(cmd);
     String _in=Request.Form[ParentID+"_in"];
     //if (_in == "0")
     //{
     //    return RedirectToAction("ViewPDF", "rptCongSan_ChiTietTaiSan", new { iID_MaTaiSan = iID_MaTaiSan });
     //}
     return RedirectToAction(ParentID, "KTCS_TaiSan", new { Saved = 1, In = _in, iID_MaTaiSan = iID_MaTaiSan });
 }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:26,代码来源:KTCS_TaiSanController.cs

示例9: SuaCauHinh

        public static Boolean SuaCauHinh(String sID_MaNguoiDung, Object options)
        {
            Boolean vR = false;
            Bang bang = new Bang("DC_NguoiDungCauHinh");
            bang.MaNguoiDungSua = sID_MaNguoiDung;

            Boolean okUpdate = false;
            PropertyInfo[] properties = options.GetType().GetProperties();
            for (int i = 0; i < properties.Length; i++)
            {
                bang.CmdParams.Parameters.AddWithValue("@" + properties[i].Name, properties[i].GetValue(options, null));
                okUpdate = true;
            }
            if (okUpdate)
            {
                SqlCommand cmd = new SqlCommand("SELECT iID_MaNguoiDungCauHinh FROM DC_NguoiDungCauHinh WHERE [email protected]_MaNguoiDungTao");
                cmd.Parameters.AddWithValue("@sID_MaNguoiDungTao", sID_MaNguoiDung);
                int iID_MaNguoiDungCauHinh = Convert.ToInt32( Connection.GetValue(cmd, -1));
                cmd.Dispose();
                if (iID_MaNguoiDungCauHinh >= 0)
                {
                    bang.DuLieuMoi = false;
                    bang.GiaTriKhoa = iID_MaNguoiDungCauHinh;
                }
                bang.Save();
                vR = true;
                iNamLamViec=LayCauHinhChiTiet(sID_MaNguoiDung,"iNamLamViec");
            }
            return vR;
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:30,代码来源:NguoiDungCauHinhModels.cs

示例10: Edit_Fast_KhenThuong_Submit

        /// <summary>
        /// Thêm dữ liệu vào bảng khen thưởng
        /// </summary>
        /// <param name="ParentID"></param>
        /// <param name="OnSuccess"></param>
        /// <param name="iID_MaKhenThuong"></param>
        /// <returns></returns>
        public JavaScriptResult Edit_Fast_KhenThuong_Submit(String ParentID, String OnSuccess, String iID_MaCanBo, String iID_MaKhenThuong)
        {
            Bang bang = new Bang("CB_KhenThuong");
            bang.TruyenGiaTri(ParentID, Request.Form);
            bang.MaNguoiDungSua = User.Identity.Name;
            bang.IPSua = Request.UserHostAddress;
            bang.CmdParams.Parameters.AddWithValue("@iID_MaCanBo", iID_MaCanBo);
            if (Request.Form[ParentID + "_DuLieuMoi"] == "1")
            {
                bang.Save();
            }
            else
            {
                bang.GiaTriKhoa = iID_MaKhenThuong;
                bang.Save();
            }

            String strJ = "";
            if (String.IsNullOrEmpty(OnSuccess) == false)
            {
                strJ = String.Format("Dialog_close('{0}');{1}();", ParentID, OnSuccess);
            }
            else
            {
                strJ = String.Format("Dialog_close('{0}');", ParentID);
            }
            return JavaScript(strJ);
        }
开发者ID:BMSProject2015,项目名称:BMS,代码行数:35,代码来源:CanBo_KhenThuongController.cs

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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