• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Constants.Sql类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: Delete

        /// <summary>
        /// Deleted Update Bảng
        /// </summary>
        public bool Delete(Entities.ChiTietXuatHuy ctxh1)
        {
            try
            {
                bool kt = false;
                ctxh = new Constants.ChiTietXuatHuy();
                Sql = new Constants.Sql();
                string sql = Sql.DeleteChiTietXuatHuy;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);

                cmd.Parameters.Add(ctxh.HanhDong, SqlDbType.VarChar, 20).Value = ctxh1.HanhDong;
                cmd.Parameters.Add(ctxh.MaPhieuXuatHuy, SqlDbType.VarChar, 20).Value = ctxh1.MaPhieuXuatHuy;
                cmd.Parameters.Add(ctxh.MaHangHoa, SqlDbType.VarChar, 50).Value = ctxh1.MaHangHoa;

                int i = cmd.ExecuteNonQuery();
                if (i == 1)
                    kt = true;
                else
                    kt = false;
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return kt;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return false;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:37,代码来源:ChiTietXuatHuy.cs


示例2: InsertUpdate

        public int InsertUpdate(Entities.TKNganHang tk1)
        {
            TKNH = new Constants.TKNganHang();
            Sql = new Constants.Sql();
            string sql = Sql.InsertUpdateTKNganHang;
            Connection conn = new Connection();
            SqlConnection cn = conn.openConnection();
            SqlCommand cmd = new SqlCommand(sql, cn);
            cmd.Parameters.Add(TKNH.HanhDong, SqlDbType.NVarChar, 20).Value = tk1.HanhDong;
            cmd.Parameters.Add(TKNH.TKNganHangID, SqlDbType.Int).Value = tk1.TKNganHangID;
            cmd.Parameters.Add(TKNH.MaTKNganHang, SqlDbType.NVarChar, 20).Value = tk1.MaTKNganHang;
            cmd.Parameters.Add(TKNH.SoTK, SqlDbType.NVarChar, 20).Value = tk1.SoTK;
            cmd.Parameters.Add(TKNH.MaTienTe, SqlDbType.NVarChar, 200).Value = tk1.MaTienTe;
            cmd.Parameters.Add(TKNH.SoDu, SqlDbType.Int).Value = tk1.SoDu;
            cmd.Parameters.Add(TKNH.SoSecKeTiep, SqlDbType.NVarChar, 20).Value = tk1.SoSecKeTiep;
            cmd.Parameters.Add(TKNH.NguoiLienHe, SqlDbType.NVarChar, 200).Value = tk1.NguoiLienHe;
            cmd.Parameters.Add(TKNH.DiaChi, SqlDbType.NVarChar, 200).Value = tk1.DiaChi;
            cmd.Parameters.Add(TKNH.DienThoai, SqlDbType.NVarChar, 20).Value = tk1.DienThoai;
            cmd.Parameters.Add(TKNH.Email, SqlDbType.NVarChar, 20).Value = tk1.Email;
            cmd.Parameters.Add(TKNH.Website, SqlDbType.NVarChar, 20).Value = tk1.Website;
            cmd.Parameters.Add(TKNH.GhiChu, SqlDbType.NVarChar, 200).Value = tk1.Ghichu;
            cmd.Parameters.Add(TKNH.Laisuat, SqlDbType.Float).Value = tk1.Laisuat;
            cmd.Parameters.Add(TKNH.Deleted, SqlDbType.Bit).Value = tk1.Deleted;

            int i = cmd.ExecuteNonQuery();
            cmd.Connection.Dispose();
            cn.Close();
            conn.closeConnection();
            cn = null;
            conn = null;
            return i;
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:32,代码来源:TKNganHang.cs


示例3: Delete

 /// <summary>
 /// Delete Bảng
 /// </summary>
 public bool Delete(Entities.SoDuCongNo pxh)
 {
     try
     {
         bool kt = false;
         pt = new Constants.CongNo();
         Sql = new Constants.Sql();
         string sql = Sql.DeleteSoDuCongNo;
         Connection conn = new Connection();
         SqlConnection cn = conn.openConnection();
         SqlCommand cmd = new SqlCommand(sql, cn);
         cmd.Parameters.Add(pt.MaSoDuCongNo, SqlDbType.VarChar, 20).Value = pxh.MaSoDuCongNo;
         int i = cmd.ExecuteNonQuery();
         if (i == 1)
             kt = true;
         else
             kt = false;
         cmd.Connection.Dispose();
         cn.Close();
         conn.closeConnection();
         cn = null;
         conn = null;
         return kt;
     }
     catch
     {
         return false;
     }
 }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:32,代码来源:CongNo.cs


示例4: Delete

        public int Delete(Entities.TheGiamGia pb1)
        {
            try
            {
                pb = new Constants.TheGiamGia();
                Sql = new Constants.Sql();
                string sql = Sql.DeleteTheGiamGia;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(pb.MaTheGiamGia, SqlDbType.VarChar, 50).Value = pb1.MaTheGiamGia;

                int i = cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return i;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return 0;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:26,代码来源:TheGiamGia.cs


示例5: InsertUpdate

        public int InsertUpdate(Entities.PhieuDieuChuyenKhoNoiBo PhieuDCK)
        {
            try
            {
                pdcknb = new Constants.PhieuDieuChuyenKhoNoiBo();
                Sql = new Constants.Sql();
                string sql = Sql.InsertUpdatePhieuDieuChuyenKhoNoiBo;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(pdcknb.HanhDong, SqlDbType.NVarChar, 20).Value = PhieuDCK.HanhDong;
                cmd.Parameters.Add(pdcknb.PhieuDieuChuyenKhoID, SqlDbType.Int).Value = PhieuDCK.PhieuDieuChuyenKhoID;
                cmd.Parameters.Add(pdcknb.MaPhieuDieuChuyenKho, SqlDbType.NVarChar, 20).Value = PhieuDCK.MaPhieuDieuChuyenKho;
                cmd.Parameters.Add(pdcknb.NgayDieuChuyen, SqlDbType.DateTime).Value = PhieuDCK.NgayDieuChuyen;
                cmd.Parameters.Add(pdcknb.TuKho, SqlDbType.VarChar, 20).Value = PhieuDCK.TuKho;
                cmd.Parameters.Add(pdcknb.DenKho, SqlDbType.VarChar, 20).Value = PhieuDCK.DenKho;
                cmd.Parameters.Add(pdcknb.MaHoaDonNhap, SqlDbType.VarChar, 20).Value = PhieuDCK.MaHoaDonNhap;
                cmd.Parameters.Add(pdcknb.XacNhan, SqlDbType.Bit).Value = PhieuDCK.XacNhan;
                cmd.Parameters.Add(pdcknb.GhiChu, SqlDbType.NVarChar, 100).Value = PhieuDCK.GhiChu;
                cmd.Parameters.Add(pdcknb.Deleted, SqlDbType.Bit).Value = PhieuDCK.Deleted;

                int i = cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return i;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return 0;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:35,代码来源:PhieuDieuChuyenKhoNoiBo.cs


示例6: InsertUpdate

        //insert update
        public int InsertUpdate(Entities.CapNhatGia cng1)
        {
            cng = new Constants.CapNhatGia();
            Sql = new Constants.Sql();
            string sql = Sql.InsertUpdateCapNhatGia;
            Connection conn = new Connection();
            SqlConnection cn = conn.openConnection();
            SqlCommand cmd = new SqlCommand(sql, cn);
            cmd.Parameters.Add(cng.HanhDong, SqlDbType.NVarChar, 20).Value = cng1.HanhDong;
            cmd.Parameters.Add(cng.CapNhatGiaID, SqlDbType.Int).Value = cng1.CapNhatGiaID;
            cmd.Parameters.Add(cng.MaCapNhatGia, SqlDbType.NVarChar, 20).Value = cng1.MaCapNhatGia;
            cmd.Parameters.Add(cng.NgayBatDau, SqlDbType.DateTime).Value = cng1.NgayBatDau;
            cmd.Parameters.Add(cng.NgayKetThuc, SqlDbType.DateTime).Value = cng1.NgayKetThuc;
            cmd.Parameters.Add(cng.MaHangHoa, SqlDbType.NVarChar,20).Value = cng1.MaHangHoa;
            cmd.Parameters.Add(cng.PhanTramGiaBanBuon, SqlDbType.Float).Value = cng1.PhanTramGiaBanBuon;
            cmd.Parameters.Add(cng.PhanTramGiaBanLe, SqlDbType.Float).Value = cng1.PhanTramGiaBanLe;
            cmd.Parameters.Add(cng.GiaNhap, SqlDbType.Float).Value = cng1.GiaNhap;
            cmd.Parameters.Add(cng.Trangthai, SqlDbType.Bit).Value = cng1.Trangthai;
            cmd.Parameters.Add(cng.GhiChu, SqlDbType.NVarChar, 100).Value = cng1.GhiChu;
            cmd.Parameters.Add(cng.Deleted, SqlDbType.Bit).Value = cng1.Deleted;

            int i = cmd.ExecuteNonQuery();
            cmd.Connection.Dispose();
            cn.Close();
            conn.closeConnection();
            cn = null;
            conn = null;
            return i;
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:30,代码来源:CapNhatGia.cs


示例7: InsertUpdate

        public int InsertUpdate(Entities.PhongBan pb1)
        {
            try
            {
                pb = new Constants.PhongBan();
                Sql = new Constants.Sql();
                string sql = Sql.InsertUpdatePhongBan;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(pb.HanhDong, SqlDbType.NVarChar, 20).Value = pb1.HanhDong;
                cmd.Parameters.Add(pb.PhongBanID, SqlDbType.Int).Value = pb1.PhongBanID;
                cmd.Parameters.Add(pb.MaPhongBan, SqlDbType.NVarChar, 20).Value = pb1.MaPhongBan;
                cmd.Parameters.Add(pb.TenPhongBan, SqlDbType.NVarChar, 200).Value = pb1.TenPhongBan;
                cmd.Parameters.Add(pb.GhiChu, SqlDbType.NVarChar, 100).Value = pb1.GhiChu;
                cmd.Parameters.Add(pb.Deleted, SqlDbType.Bit).Value = pb1.Deleted;

                int i = cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return i;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return 0;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:31,代码来源:PhongBan.cs


示例8: Insert

 /// <summary>
 /// Insert Update Bảng
 /// </summary>
 public bool Insert(Entities.SoDuSoQuy pxh)
 {
     try
     {
         bool kt = false;
         pt = new Constants.SoQuy();
         Sql = new Constants.Sql();
         string sql = Sql.InsertSoDuSoQuy;
         Connection conn = new Connection();
         SqlConnection cn = conn.openConnection();
         SqlCommand cmd = new SqlCommand(sql, cn);
         cmd.Parameters.Add(pt.MaSoDuSoQuy, SqlDbType.VarChar, 20).Value = pxh.MaSoDuSoQuy;
         cmd.Parameters.Add(pt.SoDuDauKy, SqlDbType.Float).Value = pxh.SoDuDauKy;
         cmd.Parameters.Add(pt.NgayKetChuyen, SqlDbType.DateTime).Value = pxh.NgayKetChuyen;
         cmd.Parameters.Add(pt.SoDuCuoiKy, SqlDbType.Float).Value = pxh.SoDuCuoiKy;
         cmd.Parameters.Add(pt.TrangThai, SqlDbType.Bit).Value = pxh.TrangThai;
         int i = cmd.ExecuteNonQuery();
         if (i == 1)
             kt = true;
         else
             kt = false;
         cmd.Connection.Dispose();
         cn.Close();
         conn.closeConnection();
         cn = null;
         conn = null;
         return kt;
     }
     catch
     {
         return false;
     }
 }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:36,代码来源:SoQuy.cs


示例9: Delete

        //delete
        public bool Delete(Entities.NhomHang NhomHang)
        {
            bool kt = false;
            try
            {
                nhh = new Constants.NhomHangHoa();
                Entities.NhomHang nhomhanghoa = new Entities.NhomHang();
                Sql = new Constants.Sql();
                string sql = Sql.DeleteNhomHangHoa;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(nhh.HanhDong, SqlDbType.NVarChar, 20).Value = NhomHang.HanhDong;
                cmd.Parameters.Add(nhh.NhomHangID, SqlDbType.Int).Value = NhomHang.NhomHangID;

                int i = cmd.ExecuteNonQuery();
                if (i == 1)
                    kt = true;
                else
                    kt = false;
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return kt;
            }
            catch
            {
                return kt;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:33,代码来源:NhomHang.cs


示例10: Insert

        public int Insert(Entities.TheGiamGia pb1)
        {
            try
            {
                pb = new Constants.TheGiamGia();
                Sql = new Constants.Sql();
                string sql = Sql.InsertTheGiamGia;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(pb.HanhDong, SqlDbType.NVarChar, 50).Value = pb1.HanhDong;
                cmd.Parameters.Add(pb.MaTheGiamGia, SqlDbType.VarChar, 50).Value = pb1.MaTheGiamGia;
                cmd.Parameters.Add(pb.MaKhachHang, SqlDbType.VarChar, 50).Value = pb1.MaKhachHang;
                cmd.Parameters.Add(pb.GiaTriThe, SqlDbType.Float).Value = pb1.GiaTriThe;
                cmd.Parameters.Add(pb.NgayBatDau, SqlDbType.DateTime).Value = pb1.NgayBatDau;
                cmd.Parameters.Add(pb.NgayKetThuc, SqlDbType.DateTime).Value = pb1.NgayKetThuc;
                cmd.Parameters.Add(pb.Deleted, SqlDbType.Bit).Value = pb1.Deleted;

                int i = cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return i;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return 0;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:32,代码来源:TheGiamGia.cs


示例11: InsertUpdate

        public int InsertUpdate(Entities.ChiTietPhieuDieuChuyenKho CTPhieuDCK)
        {
            try
            {
                ctpdck = new Constants.ChiTietPhieuDieuChuyenKho();
                Sql = new Constants.Sql();
                string sql = Sql.InsertUpdateChiTietPhieuDieuChuyenKho;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(ctpdck.HanhDong, SqlDbType.NVarChar, 20).Value = CTPhieuDCK.HanhDong;
                cmd.Parameters.Add(ctpdck.MaPhieuDieuChuyenKho, SqlDbType.NVarChar, 20).Value = CTPhieuDCK.MaPhieuDieuChuyenKho;
                cmd.Parameters.Add(ctpdck.MaHangHoa, SqlDbType.NVarChar, 50).Value = CTPhieuDCK.MaHangHoa;
                cmd.Parameters.Add(ctpdck.SoLuong, SqlDbType.Int).Value = CTPhieuDCK.SoLuong;
                cmd.Parameters.Add(ctpdck.GhiChu, SqlDbType.NVarChar, 100).Value = CTPhieuDCK.GhiChu;
                cmd.Parameters.Add(ctpdck.Deleted, SqlDbType.Bit).Value = CTPhieuDCK.Deleted;

                int i = cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return i;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return 0;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:31,代码来源:ChiTietPhieuDieuChuyenKho.cs


示例12: deleteNhomQuyen

        public bool deleteNhomQuyen(Entities.NhomQuyen nq1)
        {
            try
            {
                bool kt = false;
                nq = new Constants.NhomQuyen();
                Sql = new Constants.Sql();
                string sql = Sql.deleteNhomQuyen;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);

                cmd.Parameters.Add(nq.TenNhomQuyen, SqlDbType.VarChar, 50).Value = nq1.TenNhomQuyen;

                int i = cmd.ExecuteNonQuery();
                if (i >= 0)
                    kt = true;
                else
                    kt = false;
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return kt;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return false;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:32,代码来源:NhomQuyen.cs


示例13: Delete

 //delete
 public int Delete(Entities.KhoHang kh1)
 {
     int tra = 0;
     try
     {
         kh = new Constants.KhoHang();
         Entities.KhoHang khohang = new Entities.KhoHang();
         Sql = new Constants.Sql();
         string sql = Sql.DeleteKhoHang;
         Connection conn = new Connection();
         SqlConnection cn = conn.openConnection();
         SqlCommand cmd = new SqlCommand(sql, cn);
         cmd.Parameters.Add(kh.HanhDong, SqlDbType.NVarChar, 20).Value = kh1.HanhDong;
         cmd.Parameters.Add(kh.KhoHangID, SqlDbType.Int).Value = kh1.KhoHangID;
         tra = cmd.ExecuteNonQuery();
         cmd.Connection.Dispose();
         cn.Close();
         conn.closeConnection();
         cn = null;
         conn = null;
     }
     catch (Exception ex)
     { string s = ex.Message; tra = 0; }
     return tra;
 }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:26,代码来源:KhoHang.cs


示例14: Delete

 /// <summary>
 /// Delete Bảng
 /// </summary>
 public int Delete(Entities.NhomKH nkh2)
 {
     int Trave = 0;
     try
     {
         nkh = new Constants.NhomKH();
         Sql = new Constants.Sql();
         string sql = Sql.DeleteNhomKH;
         conn = new Connection();
         cn = conn.openConnection();
         cmd = new SqlCommand(sql, cn);
         cmd.Parameters.Add(nkh.HanhDong, SqlDbType.NVarChar, 20).Value = nkh2.Hanhdong.ToString();
         cmd.Parameters.Add(nkh.NhomKHID, SqlDbType.Int).Value = nkh2.NhomKHID;
         Trave = cmd.ExecuteNonQuery();
     }
     catch (Exception ex)
     { string s = ex.Message.ToString(); }
     finally
     {
         cmd.Connection.Dispose();
         cn.Close();
         conn.closeConnection();
     }
     return Trave;
 }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:28,代码来源:NhomKH.cs


示例15: Delete

        /// <summary>
        /// Delete Bảng
        /// </summary>
        public bool Delete(Entities.PhieuTTCuaKH pttckh)
        {
            try
            {
                bool kt = false;
                pt = new Constants.PhieuTTCuaKH();
                Sql = new Constants.Sql();
                string sql = Sql.DeletePhieuTTCuaKH;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(pt.HanhDong, SqlDbType.NVarChar, 20).Value = pttckh.HanhDong;
                cmd.Parameters.Add(pt.PhieuTTCuaKHID, SqlDbType.Int).Value = pttckh.PhieuTTCuaKHID;

                int i = cmd.ExecuteNonQuery();
                if (i == 1)
                    kt = true;
                else
                    kt = false;
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return kt;
            }
            catch
            {
                return false;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:34,代码来源:PhieuTTCuaKH.cs


示例16: deleteTaiKhoan

        public bool deleteTaiKhoan(Entities.TaiKhoan tk1)
        {
            try
            {
                bool kt = false;
                tk = new Constants.TaiKhoan();
                Sql = new Constants.Sql();
                string sql = Sql.deleteTaiKhoan;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);

                cmd.Parameters.Add(tk.TenDangNhap, SqlDbType.VarChar, 200).Value = tk1.TenDangNhap;

                int i = cmd.ExecuteNonQuery();
                if (i >= 0)
                    kt = true;
                else
                    kt = false;
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return kt;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return false;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:32,代码来源:TaiKhoan.cs


示例17: InsertUpdate

        public int InsertUpdate(Entities.TienTe tt1)
        {
            try
            {
                tt = new Constants.TienTe();
                Sql = new Constants.Sql();
                string sql = Sql.InsertUpdateTienTe;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(tt.HanhDong, SqlDbType.NVarChar, 20).Value = tt1.HanhDong;
                cmd.Parameters.Add(tt.TienteID, SqlDbType.Int).Value = tt1.TienteID;
                cmd.Parameters.Add(tt.MaTienTe, SqlDbType.NVarChar, 20).Value = tt1.MaTienTe;
                cmd.Parameters.Add(tt.TenTienTe, SqlDbType.NVarChar, 200).Value = tt1.TenTienTe;
                cmd.Parameters.Add(tt.TenTienTeChan, SqlDbType.NVarChar, 200).Value = tt1.TenTienTeChan;
                cmd.Parameters.Add(tt.TenTienTeLe, SqlDbType.NVarChar, 200).Value = tt1.TenTienTeLe;
                cmd.Parameters.Add(tt.BieuTuong, SqlDbType.NVarChar, 20).Value = tt1.BieuTuong;
                cmd.Parameters.Add(tt.DonViLamTron, SqlDbType.Int).Value = tt1.DonViLamTron;
                cmd.Parameters.Add(tt.GhiChu, SqlDbType.NVarChar, 100).Value = tt1.GhiChu;
                cmd.Parameters.Add(tt.Deleted, SqlDbType.Bit).Value = tt1.Deleted;

                int i = cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return i;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
                return 0;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:35,代码来源:TienTe.cs


示例18: Delete

        public void Delete(Entities.TKNganHang tk1)
        {
            try
            {
                TKNH = new Constants.TKNganHang();
                Entities.TKNganHang TKNganHang = new Entities.TKNganHang();
                Sql = new Constants.Sql();
                string sql = Sql.DeleteTKNganHang;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(TKNH.HanhDong, SqlDbType.NVarChar, 20).Value = tk1.HanhDong;
                cmd.Parameters.Add(TKNH.TKNganHangID, SqlDbType.Int).Value = tk1.TKNganHangID;

                cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
            }
            catch (Exception ex)
            {
                string s = ex.Message;
            }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:26,代码来源:TKNganHang.cs


示例19: InsertUpdate

        public int InsertUpdate(Entities.KMThuChi km1)
        {
            try
            {
                Kmtc = new Constants.KMThuChi();
                Sql = new Constants.Sql();
                string sql = Sql.InsertUpdateKMThuChi;
                Connection conn = new Connection();
                SqlConnection cn = conn.openConnection();
                SqlCommand cmd = new SqlCommand(sql, cn);
                cmd.Parameters.Add(Kmtc.HanhDong, SqlDbType.NVarChar, 20).Value = km1.HanhDong;
                cmd.Parameters.Add(Kmtc.ThuChiID, SqlDbType.Int).Value = km1.ThuChiID;
                cmd.Parameters.Add(Kmtc.MaKhoanMuc, SqlDbType.NVarChar, 20).Value = km1.MaKhoanMuc;
                cmd.Parameters.Add(Kmtc.TenKhoanMuc, SqlDbType.NVarChar, 200).Value = km1.TenKhoanMuc;
                cmd.Parameters.Add(Kmtc.LoaiKM, SqlDbType.Bit).Value = km1.LoaiKM;
                cmd.Parameters.Add(Kmtc.DoiTuong, SqlDbType.NVarChar, 200).Value = km1.DoiTuong;
                cmd.Parameters.Add(Kmtc.NoTK, SqlDbType.VarChar, 20).Value = km1.NoTK;
                cmd.Parameters.Add(Kmtc.CoTK, SqlDbType.VarChar, 20).Value = km1.CoTK;
                cmd.Parameters.Add(Kmtc.GhiChu, SqlDbType.NVarChar, 200).Value = km1.GhiChu;
                cmd.Parameters.Add(Kmtc.Deleted, SqlDbType.Bit).Value = km1.Deleted;

                int i = cmd.ExecuteNonQuery();
                cmd.Connection.Dispose();
                cn.Close();
                conn.closeConnection();
                cn = null;
                conn = null;
                return i;
            }
            catch (Exception ex) { string s = ex.Message; return 0; }
        }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:31,代码来源:KMThuChi.cs


示例20: Delete

 public bool Delete(string maHDBanHang)
 {
     try
     {
         bool kt = false;
         hdbh = new Constants.HDBanHang();
         Sql = new Constants.Sql();
         string sql = Sql.DeleteHDBanHang;
         Connection conn = new Connection();
         SqlConnection cn = conn.openConnection();
         SqlCommand cmd = new SqlCommand(sql, cn);
         cmd.Parameters.Add("@maHDBanHang", SqlDbType.VarChar, 20).Value = maHDBanHang;
         int i = cmd.ExecuteNonQuery();
         if (i == 1)
             kt = true;
         else
             kt = false;
         cmd.Connection.Dispose();
         cn.Close();
         conn.closeConnection();
         cn = null;
         conn = null;
         return kt;
     }
     catch (Exception ex)
     {
         string s = ex.Message;
         return false;
     }
 }
开发者ID:mrk29vn,项目名称:vna-accounting,代码行数:30,代码来源:HDBanHang.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Common.List类代码示例发布时间:2022-05-24
下一篇:
C# CommandMessenger.SendCommand类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap