示例#1
0
        public int update(BaoHiemEntities obj)
        {
            int        result   = 0;
            string     strQuery = "update dbo.BaoHiem set MaNV='" + obj.Manv + "',NgayCapSo='" + obj.Songaycap + "',NoiCapSo='" + obj.Noicapso + "',GhiChu='" + obj.Ghichu + "' where MaSBH='" + obj.Masbh + "'";
            DataConfig config   = new DataConfig();

            result = config.excuteNonquery(strQuery); //thucthi
            return(result);                           //tra ve so ban ghi
        }
示例#2
0
        /*  public DataTable FindItem(string item)
         * {
         *    DataTable result = new DataTable();
         *    DataConfig config = new DataConfig();
         *    string strQuery = "select *from dbo.BaoHiem where MaChucVu like '%" + item + "%' or TenChucvu '%" + item + "%'";
         *    result = config.GetData(strQuery);
         *    return result;
         * }*/
        public int Insert(BaoHiemEntities obj)
        {
            int        result   = 0;
            string     strQuery = "insert into dbo.BaoHiem(MaNV,MaSBH,NgayCapSo,NoiCapSo,GhiChu) values('" + obj.Manv + "','" + obj.Masbh + "','" + obj.Songaycap + "','" + obj.Noicapso + "','" + obj.Ghichu + "')";
            DataConfig config   = new DataConfig();

            result = config.excuteNonquery(strQuery); //thucthi
            return(result);                           //tra ve so ban ghi
        }