예제 #1
0
        public void UpdateFields(int CuaHangID, string TenCuaHang, string GioiThieu, int? NguoiDungID, string Email, string Anh, string DienThoaiDiDong, string DienThoaiCoDinh, string ThongTinLienHe, string DiaChi, string Website, string Fax, string YM, bool? KichHoat, int? SapXep, string Bak1, string Bak2, int? Bak3, int? Bak4, bool? Bak5, string bak6, string bak7, string bak8, int? Bak9, short? BaoDam, short? LoaiCuaHang, int? LoaiCuaHangID)
        {
            DataAccess objDataAccess = new DataAccess();
            using (SqlCommand sqlCmd = new SqlCommand())
            {
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.CommandText = "UpdateFieldsCuaHang";

                sqlCmd.Parameters.Add("@CuaHangID", SqlDbType.Int ).Value = CuaHangID;
                       sqlCmd.Parameters.Add("@TenCuaHang",SqlDbType.NVarChar,100).Value = TenCuaHang;

                       sqlCmd.Parameters.Add("@GioiThieu",SqlDbType.NVarChar,4000).Value = GioiThieu;

                   		sqlCmd.Parameters.Add("@NguoiDungID",SqlDbType.Int).Value = NguoiDungID;

                       sqlCmd.Parameters.Add("@Email",SqlDbType.NVarChar,50).Value = Email;

                       sqlCmd.Parameters.Add("@Anh",SqlDbType.NVarChar,100).Value = Anh;

                       sqlCmd.Parameters.Add("@DienThoaiDiDong",SqlDbType.NVarChar,50).Value = DienThoaiDiDong;

                       sqlCmd.Parameters.Add("@DienThoaiCoDinh",SqlDbType.NVarChar,50).Value = DienThoaiCoDinh;

                       sqlCmd.Parameters.Add("@ThongTinLienHe",SqlDbType.NVarChar,4000).Value = ThongTinLienHe;

                       sqlCmd.Parameters.Add("@DiaChi",SqlDbType.NVarChar,200).Value = DiaChi;

                       sqlCmd.Parameters.Add("@Website",SqlDbType.NVarChar,200).Value = Website;

                       sqlCmd.Parameters.Add("@Fax",SqlDbType.NVarChar,50).Value = Fax;

                       sqlCmd.Parameters.Add("@YM",SqlDbType.NVarChar,50).Value = YM;

                   		sqlCmd.Parameters.Add("@KichHoat",SqlDbType.Bit).Value = KichHoat;

                   		sqlCmd.Parameters.Add("@SapXep",SqlDbType.Int).Value = SapXep;

                       sqlCmd.Parameters.Add("@Bak1",SqlDbType.NVarChar,50).Value = Bak1;

                       sqlCmd.Parameters.Add("@Bak2",SqlDbType.NVarChar,1000).Value = Bak2;

                   		sqlCmd.Parameters.Add("@Bak3",SqlDbType.Int).Value = Bak3;

                   		sqlCmd.Parameters.Add("@Bak4",SqlDbType.Int).Value = Bak4;

                   		sqlCmd.Parameters.Add("@Bak5",SqlDbType.Bit).Value = Bak5;

                       sqlCmd.Parameters.Add("@bak6",SqlDbType.NVarChar,50).Value = bak6;

                       sqlCmd.Parameters.Add("@bak7",SqlDbType.NVarChar,1000).Value = bak7;

                       sqlCmd.Parameters.Add("@bak8",SqlDbType.NVarChar,1000).Value = bak8;

                   		sqlCmd.Parameters.Add("@Bak9",SqlDbType.Int).Value = Bak9;

                   		sqlCmd.Parameters.Add("@BaoDam",SqlDbType.TinyInt).Value = BaoDam;

                   		sqlCmd.Parameters.Add("@LoaiCuaHang",SqlDbType.TinyInt).Value = LoaiCuaHang;

                   		sqlCmd.Parameters.Add("@LoaiCuaHangID",SqlDbType.Int).Value = LoaiCuaHangID;

                objDataAccess.ExecuteNonQuery(sqlCmd);
            }
        }
예제 #2
0
        public void UpdateFields(int LoaiCuaHangID, string TenLoaiCuaHang, string Mota)
        {
            DataAccess objDataAccess = new DataAccess();
            using (SqlCommand sqlCmd = new SqlCommand())
            {
                sqlCmd.CommandType = CommandType.StoredProcedure;
                sqlCmd.CommandText = "UpdateFieldsLoaiCuaHang";

                sqlCmd.Parameters.Add("@LoaiCuaHangID", SqlDbType.Int ).Value = LoaiCuaHangID;
                       sqlCmd.Parameters.Add("@TenLoaiCuaHang",SqlDbType.NVarChar,100).Value = TenLoaiCuaHang;

                       sqlCmd.Parameters.Add("@Mota",SqlDbType.NVarChar,200).Value = Mota;

                objDataAccess.ExecuteNonQuery(sqlCmd);
            }
        }