Exemplo n.º 1
0
        public int InsertProduct(int AgentCatID, string Lang, int GroupID, string MaSanPham, string TenGoi, string NgoaiTe, string GiaBan, string GiaKhuyenMai,
                                 string ThongTin1, string ThongTin2, string Anh, int ProducerID, string Keyword, bool IsNew, bool IsHot, bool IsBestSeller)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "INSERT INTO ProductCat (AgentCatID, Lang, GroupID, MaSanPham, TenGoi, NgoaiTe, GiaBan, GiaKhuyenMai, ThongTin1, ThongTin2, Anh, ProducerID, Keyword, IsNew, IsHot, IsBestSeller) ";
                Sql += "VALUES (@AgentCatID, @Lang, @GroupID, @MaSanPham, @TenGoi, @NgoaiTe, @GiaBan, @GiaKhuyenMai, @ThongTin1, @ThongTin2, @Anh, @ProducerID, @Keyword, @IsNew, @IsHot, @IsBestSeller)";

                string[] strParaName = new string[16] {
                    "@AgentCatID", "@Lang", "@GroupID", "@MaSanPham", "@TenGoi", "@NgoaiTe", "@GiaBan", "@GiaKhuyenMai", "@ThongTin1", "@ThongTin2", "@Anh", "@ProducerID", "@Keyword", "@IsNew", "@IsHot", "@IsBestSeller"
                };
                SqlDbType[] sqlDbType = new SqlDbType[16] {
                    SqlDbType.Int, SqlDbType.VarChar, SqlDbType.Int, SqlDbType.VarChar, SqlDbType.NVarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.VarChar, SqlDbType.Int, SqlDbType.NVarChar, SqlDbType.Bit, SqlDbType.Bit, SqlDbType.Bit
                };
                object[] objValue = new object[16] {
                    AgentCatID, Lang, GroupID, MaSanPham, TenGoi, NgoaiTe, GiaBan, GiaKhuyenMai, ThongTin1, ThongTin2, Anh, ProducerID, Keyword, IsNew, IsHot, IsBestSeller
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 2
0
        public int InsertAboutUsCategory(string Lang, int AgentCatID, string CategoryName, int CategoryOrder, int ParentCategoryID)
        {
            int          kq       = -1;
            MyConnection ca       = new MyConnection();
            int          ModuleID = 2; //Giới thiệu

            //try
            {
                string Sql = "INSERT INTO ArticleCategory (Lang, AgentCatID, CategoryName, CategoryOrder, ParentCategoryID, ModuleID) ";
                Sql += "VALUES (@Lang, @AgentCatID, @CategoryName, @CategoryOrder, @ParentCategoryID, @ModuleID)";

                string[] strParaName = new string[6] {
                    "@Lang", "@AgentCatID", "@CategoryName", "@CategoryOrder", "@ParentCategoryID", "@ModuleID"
                };
                SqlDbType[] sqlDbType = new SqlDbType[6] {
                    SqlDbType.VarChar, SqlDbType.Int, SqlDbType.NVarChar, SqlDbType.Int, SqlDbType.Int, SqlDbType.Int
                };
                object[] objValue = new object[6] {
                    Lang, AgentCatID, CategoryName, CategoryOrder, ParentCategoryID, ModuleID
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            //catch { }
            return(kq);
        }
Exemplo n.º 3
0
        public int InsertArticleAboutUs(string Lang, int CategoryID, string Title, string Content, string ImageURL, string ImageDesc, string Authors, string Keyword)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                int    ModuleID = 2; //Giới thiệu
                string Sql      = "INSERT INTO Article (Lang, CategoryID, Title, [Content], ImageURL, ImageDesc, Authors, Keyword, ModuleID) ";
                Sql += "VALUES (@Lang, @CategoryID, @Title, @Content, @ImageURL, @ImageDesc, @Authors, @Keyword, @ModuleID)";

                string[] strParaName = new string[9] {
                    "@Lang", "@CategoryID", "@Title", "@Content", "@ImageURL", "@ImageDesc", "@Authors", "@Keyword", "@ModuleID"
                };
                SqlDbType[] sqlDbType = new SqlDbType[9] {
                    SqlDbType.VarChar, SqlDbType.Int, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.VarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.Int
                };
                object[] objValue = new object[9] {
                    Lang, CategoryID, Title, Content, ImageURL, ImageDesc, Authors, Keyword, ModuleID
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 4
0
        public int UpdateAgentCat(int AgentCatID, string Lang, string AgentCode, string AgentName, string ContactName, string Address, int ProvinceID, string Tel, string Fax,
                                  string Email, string Yahoo, string Skype, string Website, string Logo, int ParentID, int FacultyID, bool IsHot, string Keyword, string AgentNameHidden)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            //try
            {
                string Sql = "UPDATE AgentCat SET AgentCode=@AgentCode, AgentName" + Lang + "=@AgentName, ContactName=@ContactName, Address" + Lang + "=@Address, ProvinceID=@ProvinceID, ";
                Sql += "Tel=@Tel, Fax=@Fax, Email=@Email, Yahoo=@Yahoo, Skype=@Skype, Website=@Website, Logo=@Logo, ParentID=@ParentID, FacultyID=@FacultyID, IsHot=@IsHot, Keyword=@Keyword, AgentNameHidden=@AgentNameHidden ";
                Sql += "WHERE ID=@AgentCatID";

                string[] strParaName = new string[19] {
                    "@AgentCatID", "@Lang", "@AgentCode", "@AgentName", "@ContactName", "@Address", "@ProvinceID", "@Tel", "@Fax", "@Email", "@Yahoo", "@Skype", "@Website", "@Logo", "@ParentID", "@FacultyID", "@IsHot", "@Keyword", "@AgentNameHidden"
                };
                SqlDbType[] sqlDbType = new SqlDbType[19] {
                    SqlDbType.Int, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.Int, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.Int, SqlDbType.Int, SqlDbType.Bit, SqlDbType.NVarChar, SqlDbType.NVarChar
                };
                object[] objValue = new object[19] {
                    AgentCatID, Lang, AgentCode, AgentName, ContactName, Address, ProvinceID, Tel, Fax, Email, Yahoo, Skype, Website, Logo, ParentID, FacultyID, IsHot, Keyword, AgentNameHidden
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            //catch { }
            return(kq);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Thêm công ty
        /// </summary>
        /// <param name="Lang"></param>
        /// <param name="AgentCode"></param>
        /// <param name="AgentName"></param>
        /// <param name="ContactName"></param>
        /// <param name="Address"></param>
        /// <param name="ProvinceID"></param>
        /// <param name="Tel"></param>
        /// <param name="Fax"></param>
        /// <param name="Email"></param>
        /// <param name="Yahoo"></param>
        /// <param name="Skype"></param>
        /// <param name="Website"></param>
        /// <param name="Logo"></param>
        /// <param name="ParentID"></param>
        /// <param name="FacultyID"></param>
        /// <param name="IsHot"></param>
        /// <returns></returns>
        public int InsertAgentCat(string Lang, string AgentCode, string AgentName, string ContactName, string Address, int ProvinceID, string Tel, string Fax,
                                  string Email, string Yahoo, string Skype, string Website, string Logo, int ParentID, int FacultyID, bool IsHot, string Keyword, string AgentNameHidden)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "INSERT INTO AgentCat (Lang, AgentCode, AgentName" + Lang + ", ContactName, Address" + Lang + ", ProvinceID, Tel, Fax, Email, Yahoo, Skype, Website, Logo, ParentID, FacultyID, IsHot) ";
                Sql += "VALUES (@Lang, @AgentCode, @AgentName, @ContactName, @Address, @ProvinceID, @Tel, @Fax, @Email, @Yahoo, @Skype, @Website, @Logo, @ParentID, @FacultyID, @IsHot, @Keyword, @AgentNameHidden)";

                string[] strParaName = new string[18] {
                    "@Lang", "@AgentCode", "@AgentName", "@ContactName", "@Address", "@ProvinceID", "@Tel", "@Fax", "@Email", "@Yahoo", "@Skype", "@Website", "@Logo", "@ParentID", "@FacultyID", "@IsHot", "@Keyword", "@AgentNameHidden"
                };
                SqlDbType[] sqlDbType = new SqlDbType[18] {
                    SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.Int, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.Int, SqlDbType.Int, SqlDbType.Bit, SqlDbType.NVarChar, SqlDbType.NVarChar
                };
                object[] objValue = new object[18] {
                    Lang, AgentCode, AgentName, ContactName, Address, ProvinceID, Tel, Fax, Email, Yahoo, Skype, Website, Logo, ParentID, FacultyID, IsHot, Keyword, AgentNameHidden
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 6
0
        public int UpdateProduct(int ProductID, string Lang, int GroupID, string MaSanPham, string TenGoi, string NgoaiTe, string GiaBan, string GiaKhuyenMai,
                                 string ThongTin1, string ThongTin2, string Anh, int ProducerID, string Keyword, bool IsNew, bool IsHot, bool IsBestSeller)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "UPDATE ProductCat SET GroupID=@GroupID, MaSanPham=@MaSanPham, TenGoi=@TenGoi, NgoaiTe=@NgoaiTe, GiaBan=@GiaBan, GiaKhuyenMai=@GiaKhuyenMai, ThongTin1=@ThongTin1, ThongTin2=@ThongTin2, Anh=@Anh, ProducerID=@ProducerID, Keyword=@Keyword, IsNew=@IsNew, IsHot=@IsHot, IsBestSeller=@IsBestSeller ";
                Sql += "WHERE ID=@ProductID AND Lang=@Lang";

                string[] strParaName = new string[16] {
                    "@ProductID", "@Lang", "@GroupID", "@MaSanPham", "@TenGoi", "@NgoaiTe", "@GiaBan", "@GiaKhuyenMai", "@ThongTin1", "@ThongTin2", "@Anh", "@ProducerID", "@Keyword", "@IsNew", "@IsHot", "@IsBestSeller"
                };
                SqlDbType[] sqlDbType = new SqlDbType[16] {
                    SqlDbType.Int, SqlDbType.VarChar, SqlDbType.Int, SqlDbType.VarChar, SqlDbType.NVarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.VarChar, SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.VarChar, SqlDbType.Int, SqlDbType.NVarChar, SqlDbType.Bit, SqlDbType.Bit, SqlDbType.Bit
                };
                object[] objValue = new object[16] {
                    ProductID, Lang, GroupID, MaSanPham, TenGoi, NgoaiTe, GiaBan, GiaKhuyenMai, ThongTin1, ThongTin2, Anh, ProducerID, Keyword, IsNew, IsHot, IsBestSeller
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 7
0
        public int UpdateData(string[] strParaName, SqlDbType[] sqlDbType, object[] objValue, string strSql)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                kq = ca.ExcuteSql(strSql, strParaName, sqlDbType, objValue);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 8
0
        /// <summary>
        /// Tăng điểm cho câu trả lời mà user bình chọn
        /// </summary>
        /// <param name="PollAnswerID"></param>
        /// <returns></returns>
        public int UpdateMark(int PollAnswerID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            //try
            {
                string Sql = "UPDATE PollAnswer SET Mark=Mark + 1 WHERE ID=@PollAnswerID";
                kq = ca.ExcuteSql(Sql, "@PollAnswerID", SqlDbType.Int, PollAnswerID);
            }
            //catch { }
            return(kq);
        }
Exemplo n.º 9
0
        public int DeleteLink(int LinkID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM AgentLink WHERE ID=@LinkID";
                kq = ca.ExcuteSql(Sql, "@LinkID", SqlDbType.Int, LinkID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 10
0
    public int DeleteOrderDetail(int OrderDetailID)
    {
        int          kq = -1;
        MyConnection ca = new MyConnection();

        try
        {
            string Sql = "DELETE FROM OrderDetail WHERE ID=@OrderDetailID";
            kq = ca.ExcuteSql(Sql, "@OrderDetailID", SqlDbType.Int, OrderDetailID);
        }
        catch { }
        return(kq);
    }
Exemplo n.º 11
0
        public int DeleteArticleAboutUs(int ArticleID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM Article WHERE ArticleID=@ArticleID";
                kq = ca.ExcuteSql(Sql, "@ArticleID", SqlDbType.Int, ArticleID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 12
0
        /// <summary>
        /// Xóa ngành
        /// </summary>
        /// <param name="FacultyID"></param>
        /// <returns></returns>
        public int DeleteFaculty(int FacultyID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM Faculty WHERE FacultyID=@FacultyID";
                kq = ca.ExcuteSql(Sql, "@FacultyID", SqlDbType.Int, FacultyID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 13
0
        /// <summary>
        /// Xóa công ty
        /// </summary>
        /// <param name="AgentCatID"></param>
        /// <returns></returns>
        public int DeleteAgentCat(int AgentCatID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM AgentCat WHERE ID=@AgentCatID";
                kq = ca.ExcuteSql(Sql, "@AgentCatID", SqlDbType.Int, AgentCatID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 14
0
        //Xóa sản phẩm
        public int DeleteProduct(int ProductID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM ProductCat WHERE ID=@ProductID";
                kq = ca.ExcuteSql(Sql, "@ProductID", SqlDbType.Int, ProductID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 15
0
        /// <summary>
        /// Xóa nhóm diễn đàn thảo luận
        /// </summary>
        /// <param name="ID"></param>
        /// <returns></returns>
        public int DeleteEGroup(int ID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM EGroup WHERE ID=@ID";
                kq = ca.ExcuteSql(Sql, "@ID", SqlDbType.Int, ID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 16
0
    public int DeleteRealEstateLegalStatus(int ID)
    {
        int          kq = -1;
        MyConnection ca = new MyConnection();

        try
        {
            string Sql = "DELETE FROM RealEstateLegalStatus WHERE ID=@ID";
            kq = ca.ExcuteSql(Sql, "@ID", SqlDbType.Int, ID);
        }
        catch { }
        return(kq);
    }
Exemplo n.º 17
0
        public int DeletePhoto(int PhotoID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM GalleryPhoto WHERE ID=@PhotoID";
                kq = ca.ExcuteSql(Sql, "@PhotoID", SqlDbType.Int, PhotoID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 18
0
        public int DeleteCategory(int CategoryID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM ArticleCategory WHERE CategoryID=@CategoryID";
                kq = ca.ExcuteSql(Sql, "@CategoryID", SqlDbType.Int, CategoryID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 19
0
        public int DeleteAlbum(int AlbumID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM GalleryAlbum WHERE ID=@AlbumID";
                kq = ca.ExcuteSql(Sql, "@AlbumID", SqlDbType.Int, AlbumID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 20
0
        public int DeleteColor(int ColorID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM Color WHERE ColorID=@ColorID";
                kq = ca.ExcuteSql(Sql, "@ColorID", SqlDbType.Int, ColorID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 21
0
        /// <summary>
        /// Xóa danh mục sản phẩm
        /// </summary>
        /// <param name="CatalogID"></param>
        /// <returns></returns>
        public int DeleteCatalog(int CatalogID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM GroupCat WHERE ID=@CatalogID";
                kq = ca.ExcuteSql(Sql, "@CatalogID", SqlDbType.Int, CatalogID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 22
0
        public int DeleteSize(int SizeID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM Size WHERE SizeID=@SizeID";
                kq = ca.ExcuteSql(Sql, "@SizeID", SqlDbType.Int, SizeID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 23
0
        public int DeleteWidth(int WidthID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM Width WHERE WidthID=@WidthID";
                kq = ca.ExcuteSql(Sql, "@WidthID", SqlDbType.Int, WidthID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 24
0
        public int UpdateVisitorsByUsername(string Username)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            //try
            {
                string Sql = "UPDATE Entrepreneur SET Visitors = Visitors + 1 WHERE Username=@Username";
                kq = ca.ExcuteSql(Sql, "@Username", SqlDbType.NVarChar, Username);
            }
            //catch { }
            return(kq);
        }
Exemplo n.º 25
0
        /// <summary>
        /// Xóa doanh nhân
        /// </summary>
        /// <param name="EntrepreneurID"></param>
        /// <returns></returns>
        public int DeleteEntrepreneur(int EntrepreneurID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "DELETE FROM Entrepreneur WHERE ID=@ID";
                kq = ca.ExcuteSql(Sql, "@ID", SqlDbType.Int, EntrepreneurID);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 26
0
        public int Insert(int AgentCatID, string Lang, string Title, string ImageUrl, string Descriptions, int TransactionTypeID, int RealEstateTypeID, int DistrictID, float Price, string Currency, string PriceType, bool IsNegotiatedPrice,
                          string Address, float UsedArea, float CampusAreaHorizontal, float CampusAreaVertical, float CampusAreaHorizontalBonus, float ConstructionAreaHorizontal, float ConstructionAreaVertical,
                          float ConstructionAreaHorizontalBonus, int PercentBroker, int LegalStatusID, string Position, string Direction, string StreetLength, int NumberFloors, int NumberGuestRooms,
                          int NumberBedRooms, int NumberBathRooms, int NumberOtherRoom, bool IsFacility, bool IsParking, bool IsGarden, bool IsPool, bool IsBusiness, bool IsStay, bool IsOffice, bool IsProduction,
                          bool IsStudentRent, string Username, string ContactName, string Tel, string Mobile, string ContactAddress, string Notes, bool IsHot)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string Sql = "INSERT INTO RealEstate (AgentCatID, Lang, Title, ImageUrl, Descriptions, TransactionTypeID, RealEstateTypeID, DistrictID, Price, Currency, PriceType, IsNegotiatedPrice, ";
                Sql += "Address, UsedArea, CampusAreaHorizontal, CampusAreaVertical, CampusAreaHorizontalBonus, ConstructionAreaHorizontal, ConstructionAreaVertical, ";
                Sql += "ConstructionAreaHorizontalBonus, PercentBroker, LegalStatusID, Position, Direction, StreetLength, NumberFloors, NumberGuestRooms, ";
                Sql += "NumberBedRooms, NumberBathRooms, NumberOtherRoom, IsFacility, IsParking, IsGarden, IsPool, IsBusiness, IsStay, IsOffice, IsProduction, ";
                Sql += "IsStudentRent, Username, ContactName, Tel, Mobile, ContactAddress, Notes, IsHot) ";

                Sql += "VALUES (@AgentCatID, @Lang, @Title, @ImageUrl, @Descriptions, @TransactionTypeID, @RealEstateTypeID, @DistrictID, @Price, @Currency, @PriceType, @IsNegotiatedPrice, ";
                Sql += "@Address, @UsedArea, @CampusAreaHorizontal, @CampusAreaVertical, @CampusAreaHorizontalBonus, @ConstructionAreaHorizontal, @ConstructionAreaVertical, ";
                Sql += "@ConstructionAreaHorizontalBonus, @PercentBroker, @LegalStatusID, @Position, @Direction, @StreetLength, @NumberFloors, @NumberGuestRooms, ";
                Sql += "@NumberBedRooms, @NumberBathRooms, @NumberOtherRoom, @IsFacility, @IsParking, @IsGarden, @IsPool, @IsBusiness, @IsStay, @IsOffice, @IsProduction, ";
                Sql += "@IsStudentRent, @Username, @ContactName, @Tel, @Mobile, @ContactAddress, @Notes, @IsHot)";

                string[] strParaName = new string[46] {
                    "@AgentCatID", "@Lang", "@Title", "@ImageUrl", "@Descriptions", "@TransactionTypeID", "@RealEstateTypeID", "@DistrictID", "@Price", "@Currency", "@PriceType", "@IsNegotiatedPrice",
                    "@Address", "@UsedArea", "@CampusAreaHorizontal", "@CampusAreaVertical", "@CampusAreaHorizontalBonus", "@ConstructionAreaHorizontal", "@ConstructionAreaVertical",
                    "@ConstructionAreaHorizontalBonus", "@PercentBroker", "@LegalStatusID", "@Position", "@Direction", "@StreetLength", "@NumberFloors", "@NumberGuestRooms", "@NumberBedRooms", "@NumberBathRooms",
                    "@NumberOtherRoom", "@IsFacility", "@IsParking", "@IsGarden", "@IsPool", "@IsBusiness", "@IsStay", "@IsOffice", "@IsProduction", "@IsStudentRent", "@Username", "@ContactName", "@Tel", "@Mobile", "@ContactAddress", "@Notes", "@IsHot"
                };

                object[] objValue = new object[46] {
                    AgentCatID, Lang, Title, ImageUrl, Descriptions, TransactionTypeID, RealEstateTypeID, DistrictID, Price, Currency, PriceType, IsNegotiatedPrice,
                    Address, UsedArea, CampusAreaHorizontal, CampusAreaVertical, CampusAreaHorizontalBonus, ConstructionAreaHorizontal, ConstructionAreaVertical,
                    ConstructionAreaHorizontalBonus, PercentBroker, LegalStatusID, Position, Direction, StreetLength, NumberFloors, NumberGuestRooms,
                    NumberBedRooms, NumberBathRooms, NumberOtherRoom, IsFacility, IsParking, IsGarden, IsPool, IsBusiness, IsStay, IsOffice, IsProduction,
                    IsStudentRent, Username, ContactName, Tel, Mobile, ContactAddress, Notes, IsHot
                };
                kq = ca.ExcuteSql(Sql, strParaName, objValue);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 27
0
        public int UpdateAgentLanguage(int ID, string LanguageCode, string LanguageName, int LanguageOrder)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            //try
            {
                string Sql = "UPDATE AgentLanguage SET LanguageCode=@LanguageCode, LanguageName=@LanguageName, LanguageOrder=@LanguageOrder WHERE ID=@ID";

                string[] strParaName = new string[4] {
                    "@ID", "@LanguageCode", "@LanguageName", "@LanguageOrder"
                };
                object[] objValue = new object[4] {
                    ID, LanguageCode, LanguageName, LanguageOrder
                };
                kq = ca.ExcuteSql(Sql, strParaName, objValue);
            }
            //catch { }
            return(kq);
        }
Exemplo n.º 28
0
        public int ChangePassword(string Username, string newPassword, int AgentCatID)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            //try
            {
                string   Sql         = "UPDATE UserCat SET Password=@Password WHERE AgentCatID=@AgentCatID AND Username=@Username";
                string[] strParaName = new string[3] {
                    "@AgentCatID", "@Username", "@Password"
                };
                SqlDbType[] sqlDbType = new SqlDbType[3] {
                    SqlDbType.Int, SqlDbType.VarChar, SqlDbType.VarChar
                };
                object[] objValue = new object[3] {
                    AgentCatID, Username, newPassword
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            //catch { }
            return(kq);
        }
Exemplo n.º 29
0
        public int ChangePassword(string Username, string NewPassword)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            try
            {
                string   Sql         = "UPDATE Customer SET CustomerPassword=@CustomerPassword WHERE CustomerUsername=@CustomerUsername";
                string[] strParaName = new String[2] {
                    "@CustomerPassword", "@CustomerUsername"
                };
                SqlDbType[] sqlDbType = new SqlDbType[2] {
                    SqlDbType.VarChar, SqlDbType.VarChar
                };
                object[] objValue = new Object[2] {
                    NewPassword, Username
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            catch { }
            return(kq);
        }
Exemplo n.º 30
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="AgentCatID"></param>
        /// <param name="AgentNameHidden">ten cty tieng viet khong dau</param>
        /// <param name="Keyword">dia chi cty tieng viet ko dau</param>
        /// <returns></returns>
        public int UpdateInfo(int AgentCatID, string AgentNameHidden, string Keyword)
        {
            int          kq = -1;
            MyConnection ca = new MyConnection();

            //try
            {
                string   Sql         = "UPDATE AgentCat SET AgentNameHidden=@AgentNameHidden, Keyword=@Keyword WHERE ID=@AgentCatID";
                string[] strParaName = new string[3] {
                    "@AgentNameHidden", "@Keyword", "@AgentCatID"
                };
                SqlDbType[] sqlDbType = new SqlDbType[3] {
                    SqlDbType.NVarChar, SqlDbType.NVarChar, SqlDbType.Int
                };
                object[] objValue = new object[3] {
                    AgentNameHidden, Keyword, AgentCatID
                };
                kq = ca.ExcuteSql(Sql, strParaName, sqlDbType, objValue);
            }
            //catch { }
            return(kq);
        }