예제 #1
0
        //----------------------------------------------------------------------------
        #endregion


        #region --------------------------SetMetaTags----------------------------
        //----------------------------------------------------------------------------
        //SetMetaTags
        //----------------------------------------------------------------------------
        public static void SetMetaTags(ItemsEntity item)
        {
            DCMetaBuilder metaBuilder = DCMetaBuilder.Instance;
            string        siteName    = SiteTextsManager.Instance.SiteName.Trim();

            //------------------------------------------------------------
            metaBuilder.Title = item.Title;
            //------------------------------------------------------------
            if (!string.IsNullOrEmpty(item.KeyWords))
            {
                metaBuilder.Keywords = item.KeyWords;
            }
            //------------------------------------------------------------
            if (!string.IsNullOrEmpty(item.ShortDescription))
            {
                metaBuilder.Description = item.ShortDescription;
            }
            //------------------------------------------------------------
            if (!string.IsNullOrEmpty(item.AuthorName))
            {
                metaBuilder.Author = item.AuthorName + " , " + siteName;
            }
            //------------------------------------------------------------
            metaBuilder.PubDate = item.Date_Added.ToUniversalTime().ToString();
            //------------------------------------------------------------
            metaBuilder.LastModification = item.LastModification.ToUniversalTime().ToString();
            //------------------------------------------------------------
            metaBuilder.Source = siteName;
            //------------------------------------------------------------
        }
예제 #2
0
        //----------------------------------------------------------------------------------------------------------
        public static void AddProfilePageDetails(UsersDataEntity usersDataObject)
        {
            ItemsEntity page = new ItemsEntity();

            page.ModuleTypeID = (int)ModuleTypes.UsersProfiles;
            page.OwnerID      = usersDataObject.UserId;
            //-----------------------------------------------------
            //AddDetails
            //----------------------------
            ItemsDetailsEntity itemDetailsObject;

            if (SiteSettings.Languages_HasArabicLanguages)
            {
                itemDetailsObject        = new ItemsDetailsEntity();
                itemDetailsObject.LangID = Languages.Ar;

                itemDetailsObject.Title = DynamicResource.GetText("Modules", "PageTitle_UserProfilePage");
                itemDetailsObject.ExtraData.Add("");
                page.Details[Languages.Ar] = itemDetailsObject;
            }
            if (SiteSettings.Languages_HasEnglishLanguages)
            {
                itemDetailsObject        = new ItemsDetailsEntity();
                itemDetailsObject.LangID = Languages.En;
                itemDetailsObject.Title  = DynamicResource.GetText("Modules", "PageTitle_UserProfilePage");
                itemDetailsObject.ExtraData.Add("");
                page.Details[Languages.En] = itemDetailsObject;
            }
            //-----------------------------------------------------
            ItemsModulesOptions UsersProfilesModule = ItemsModulesOptions.GetType((int)ModuleTypes.UsersProfiles);

            ItemsFactory.Create(page, UsersProfilesModule);
            //-----------------------------------------------------
            usersDataObject.ProfilePageID = page.ItemID;
        }
예제 #3
0
        //----------------------------------------------------------------------------------------------------------
        public static int AddSubSitePageDetails(int PageNo, UsersDataEntity usersDataObject)
        {
            ItemsEntity page = new ItemsEntity();

            page.ModuleTypeID = (int)ModuleTypes.SubSitePages;
            page.OwnerID      = usersDataObject.UserId;
            //-----------------------------------------------------
            //AddDetails
            //----------------------------
            ItemsDetailsEntity itemDetailsObject;

            if (SiteSettings.Languages_HasArabicLanguages)
            {
                itemDetailsObject        = new ItemsDetailsEntity();
                itemDetailsObject.LangID = Languages.Ar;
                itemDetailsObject.Title  = DynamicResource.GetText("SubSites", "Page_" + PageNo);
                itemDetailsObject.ExtraData.Add("");
                page.Details[Languages.Ar] = itemDetailsObject;
            }
            if (SiteSettings.Languages_HasEnglishLanguages)
            {
                itemDetailsObject        = new ItemsDetailsEntity();
                itemDetailsObject.LangID = Languages.En;
                itemDetailsObject.Title  = DynamicResource.GetText("SubSites", "Page_" + PageNo);
                itemDetailsObject.ExtraData.Add("");
                page.Details[Languages.En] = itemDetailsObject;
            }
            //-----------------------------------------------------
            ItemsModulesOptions subSitePagesModule = ItemsModulesOptions.GetType((int)ModuleTypes.SubSitePages);

            ItemsFactory.Create(page, subSitePagesModule);
            //-----------------------------------------------------
            return(page.ItemID);
        }
예제 #4
0
        public static void AddToCart(int itemID, ref ItemsEntity item, ref ItemCategoriesEntity category)
        {
            Guid OwnerID = SitesHandler.GetOwnerIDAsGuid();
            //---------------------------------------------------------
            Languages langID = SiteSettings.GetCurrentLanguage();

            if (item == null)
            {
                item = ItemsFactory.GetObject(itemID, langID, UsersTypes.User, OwnerID);
            }
            if (category == null)
            {
                category = ItemCategoriesFactory.GetObject(item.CategoryID, langID, OwnerID);
            }

            if (item != null && category != null)
            {
                List <ItemsOrdersDetailsModel> CartList = GetCartList();
                //---------------------------------------------------------
                bool existIntoCart = false;
                foreach (ItemsOrdersDetailsModel p in CartList)
                {
                    if (p.ItemID == itemID)
                    {
                        p.Quantity   += 1;
                        existIntoCart = true;
                        break;
                    }
                }
                if (!existIntoCart)
                {
                    ItemsOrdersDetailsModel newP = new ItemsOrdersDetailsModel();
                    newP.ItemID   = itemID;
                    newP.Quantity = 1;
                    CartList.Add(newP);
                }
                //---------------------------------------------------------
                //Session["Cart"] = CartList;
            }
        }
예제 #5
0
        //-------------------------------------------------------

        public void InitializeAllOpjects()
        {
            #region Initial lItem
            InitialItem = new ItemsEntity();
            //InitialItem.CategoryID = xxxx;
            //InitialItem.ItemID
            //InitialItem.CategoryID
            //InitialItem.ModuleTypeID = moduleType;
            //InitialItem.PhotoExtension
            InitialItem.Url             = Url;
            InitialItem.Email           = Email;
            InitialItem.MailBox         = MailBox;
            InitialItem.ZipCode         = ZipCode;
            InitialItem.Tels            = Tels;
            InitialItem.Fax             = Fax;
            InitialItem.Mobile          = Mobile;
            InitialItem.ItemDate        = ItemDate;
            InitialItem.ItemEndDate     = ItemEndDate;
            InitialItem.IsAvailable     = IsAvailable;
            InitialItem.YoutubeCode     = YoutubeCode;
            InitialItem.GoogleLatitude  = GoogleLatitude;
            InitialItem.GoogleLongitude = GoogleLongitude;
            InitialItem.Price           = Price;

            /*
             * InitialItem.SenderName
             * InitialItem.SenderEMail
             * InitialItem.SenderCountryID
             * InitialItem.Reply
             * InitialItem.ReplyDate
             * InitialItem.IsSeen
             * InitialItem.IsReplied
             * InitialItem.IsReviewed
             * InitialItem.ToUserID
             * InitialItem.ActivatedBy
             * InitialItem.ReviewedBy
             * InitialItem.OwnerID	*/
            InitialItem.Type = Type;
            #endregion
            #region InitialItemArDetails
            InitialItemArDetails = new ItemsDetailsEntity();
            //InitialItemArDetails.ItemID = InitialItem.ItemID;
            InitialItemArDetails.LangID           = Languages.Ar;
            InitialItemArDetails.Title            = ArItemTitle;
            InitialItemArDetails.ShortDescription = ArItemShortDescrpyion;
            InitialItemArDetails.Description      = ArItemDetails;
            InitialItemArDetails.KeyWords         = ArItemSeoKeyWords;
            InitialItemArDetails.Address          = ArItemAddress;
            InitialItemArDetails.AuthorName       = ArItemAuthorName;
            #endregion
            #region InitialItemArDetails

            InitialItemEnDetails = new ItemsDetailsEntity();
            //InitialItemEnDetails.ItemID = InitialItem.ItemID;
            InitialItemEnDetails.LangID           = Languages.En;
            InitialItemEnDetails.Title            = EnItemTitle;
            InitialItemEnDetails.ShortDescription = EnItemShortDescrpyion;
            InitialItemEnDetails.Description      = EnItemDetails;
            InitialItemEnDetails.KeyWords         = EnItemSeoKeyWords;
            InitialItemEnDetails.Address          = EnItemAddress;
            InitialItemEnDetails.AuthorName       = EnItemAuthorName;
            #endregion



            #region Initial Category
            InitialCategory = new ItemCategoriesEntity();
            //InitialCategory.CategoryID;
            //InitialCategory.PhotoExtension;
            //InitialCategory.ModuleTypeID;
            //InitialCategory.ParentID;
            //InitialCategory.TypeID	=Type;
            InitialCategory.ItemDate        = ItemDate;
            InitialCategory.IsAvailable     = IsAvailable;
            InitialCategory.YoutubeCode     = YoutubeCode;
            InitialCategory.GoogleLatitude  = GoogleLatitude;
            InitialCategory.GoogleLongitude = GoogleLongitude;
            #endregion
            #region Initial Category Parent
            InitialCategoryParent = new ItemCategoriesEntity();
            //InitialCategoryParent.CategoryID;
            //InitialCategoryParent.PhotoExtension;
            //InitialCategoryParent.ModuleTypeID;
            //InitialCategoryParent.ParentID;
            //InitialCategoryParent.TypeID	=Type;
            InitialCategoryParent.ItemDate        = ItemDate;
            InitialCategoryParent.IsAvailable     = IsAvailable;
            InitialCategoryParent.YoutubeCode     = YoutubeCode;
            InitialCategoryParent.GoogleLatitude  = GoogleLatitude;
            InitialCategoryParent.GoogleLongitude = GoogleLongitude;
            #endregion

            #region InitialCategoryArDetails
            InitialCategoryArDetails = new ItemCategoriesDetailsEntity();
            //InitialCategoryArDetails.CategoryID = InitialCategory.CategoryID;
            InitialCategoryArDetails.LangID           = Languages.Ar;
            InitialCategoryArDetails.Title            = ArCategoryTitle;
            InitialCategoryArDetails.ShortDescription = ArItemShortDescrpyion;
            InitialCategoryArDetails.Description      = ArItemDetails;
            InitialCategoryArDetails.KeyWords         = ArItemSeoKeyWords;
            #endregion
            #region InitialCategoryEnDetails

            InitialCategoryEnDetails = new ItemCategoriesDetailsEntity();
            //InitialCategoryEnDetails.CategoryID = InitialCategory.CategoryID;
            InitialCategoryEnDetails.LangID           = Languages.En;
            InitialCategoryEnDetails.Title            = EnCategoryTitle;
            InitialCategoryEnDetails.ShortDescription = EnItemShortDescrpyion;
            InitialCategoryEnDetails.Description      = EnItemDetails;
            InitialCategoryEnDetails.KeyWords         = EnItemSeoKeyWords;
            #endregion

            #region InitialArComment
            InitialArComment = new ItemsCommentsEntity();
            //InitialArComment.CommentID
            //InitialArComment.ItemID
            InitialArComment.LangID = Languages.Ar;
            //InitialArComment.ModuleTypeID
            //InitialArComment.BaseModuleType
            InitialArComment.SenderName = ArSenderName;
            InitialArComment.CountryID  = SenderCountryID;
            //InitialArComment.CtryShort
            InitialArComment.SendingDate  = DateTime.Now;
            InitialArComment.SenderEmail  = SenderEMail;
            InitialArComment.CommentTitle = ArCommentTitle;
            InitialArComment.CommentText  = ArItemDetails;
            InitialArComment.IsActive     = IsAvailable;
            InitialArComment.IsSeen       = IsSeen;
            #endregion
            #region InitialEnComment
            InitialEnComment = new ItemsCommentsEntity();
            //InitialEnComment.CommentID
            //InitialEnComment.ItemID
            InitialEnComment.LangID = Languages.En;
            //InitialEnComment.ModuleTypeID
            //InitialEnComment.BaseModuleType
            InitialEnComment.SenderName = EnSenderName;
            InitialEnComment.CountryID  = SenderCountryID;
            //InitialEnComment.CtryShort
            InitialEnComment.SendingDate  = DateTime.Now;
            InitialEnComment.SenderEmail  = SenderEMail;
            InitialEnComment.CommentTitle = EnCommentTitle;
            InitialEnComment.CommentText  = EnItemDetails;
            InitialArComment.IsActive     = IsAvailable;
            InitialArComment.IsSeen       = IsSeen;
            #endregion

            #region InitialArMessages
            InitialArMessages = new MessagesEntity();
            //InitialArMessages.MessageID=;
            //InitialArMessages.ModuleTypeID
            //InitialArMessages.CategoryID	;
            InitialArMessages.Name             = ArSenderName;
            InitialArMessages.Mobile           = Mobile;
            InitialArMessages.EMail            = Email;
            InitialArMessages.NationalityID    = SiteSettings.Admininstration_SiteDefaultCountryID;
            InitialArMessages.CountryID        = SiteSettings.Admininstration_SiteDefaultCountryID;
            InitialArMessages.Address          = ArItemAddress;
            InitialArMessages.JobTel           = JobTel;
            InitialArMessages.Type             = Type;
            InitialArMessages.Title            = ArMessageTitle;
            InitialArMessages.Details          = ArItemDetails;
            InitialArMessages.ShortDescription = ArItemShortDescrpyion;
            InitialArMessages.Reply            = ArItemDetails;
            InitialArMessages.ReplyDate        = DateTime.Now;
            InitialArMessages.IsAvailable      = IsAvailable;
            InitialArMessages.IsSeen           = IsSeen;
            InitialArMessages.IsReplied        = IsReplied;
            InitialArMessages.LangID           = Languages.Ar;
            InitialArMessages.Gender           = Gender.Male;
            InitialArMessages.BirthDate        = BirthDate;
            InitialArMessages.CityID           = CityID;
            InitialArMessages.UserCityName     = UserCityNameAr;
            InitialArMessages.Tel          = Tels;
            InitialArMessages.Fax          = Fax;
            InitialArMessages.MailBox      = MailBox;
            InitialArMessages.ZipCode      = ZipCode;
            InitialArMessages.JobID        = JobID;
            InitialArMessages.JobText      = JobTextAr;
            InitialArMessages.Company      = CompanyAr;
            InitialArMessages.ActivitiesID = ActivitiesID;
            InitialArMessages.Url          = Url;
            //InitialArMessages.PhotoExtension
            InitialArMessages.SocialStatus    = SocialStatus;
            InitialArMessages.EducationLevel  = EducationLevel;
            InitialArMessages.EmpNo           = EmpNo;
            InitialArMessages.HasSmsService   = HasSmsService;
            InitialArMessages.HasEmailService = HasEmailService;
            //InitialArMessages.Notes1
            //InitialArMessages.Notes2
            InitialArMessages.AgeRang          = AgeRang;
            InitialArMessages.ItemDate         = ItemDate;
            InitialArMessages.YoutubeCode      = YoutubeCode;
            InitialArMessages.GoogleLatitude   = GoogleLatitude.ToString();
            InitialArMessages.GoogleLongitude  = GoogleLongitude.ToString();
            InitialArMessages.Price            = Price;
            InitialArMessages.KeyWords         = ArItemSeoKeyWords;
            InitialArMessages.LastModification = DateTime.Now;
            #endregion

            #region InitialEnMessages
            InitialEnMessages = new MessagesEntity();
            //InitialEnMessages.MessageID=;
            //InitialEnMessages.ModuleTypeID
            //InitialEnMessages.CategoryID	;
            InitialEnMessages.Name             = EnSenderName;
            InitialEnMessages.Mobile           = Mobile;
            InitialEnMessages.EMail            = Email;
            InitialEnMessages.NationalityID    = SiteSettings.Admininstration_SiteDefaultCountryID;
            InitialEnMessages.CountryID        = SiteSettings.Admininstration_SiteDefaultCountryID;
            InitialEnMessages.Address          = EnItemAddress;
            InitialEnMessages.JobTel           = JobTel;
            InitialEnMessages.Type             = Type;
            InitialEnMessages.Title            = EnMessageTitle;
            InitialEnMessages.Details          = EnItemDetails;
            InitialEnMessages.ShortDescription = EnItemShortDescrpyion;
            InitialEnMessages.Reply            = EnItemDetails;
            InitialEnMessages.ReplyDate        = DateTime.Now;
            InitialEnMessages.IsAvailable      = IsAvailable;
            InitialEnMessages.IsSeen           = IsSeen;
            InitialEnMessages.IsReplied        = IsReplied;
            InitialEnMessages.LangID           = Languages.En;
            InitialEnMessages.Gender           = Gender.Male;
            InitialEnMessages.BirthDate        = BirthDate;
            InitialEnMessages.CityID           = CityID;
            InitialEnMessages.UserCityName     = UserCityNameEn;
            InitialEnMessages.Tel          = Tels;
            InitialEnMessages.Fax          = Fax;
            InitialEnMessages.MailBox      = MailBox;
            InitialEnMessages.ZipCode      = ZipCode;
            InitialEnMessages.JobID        = JobID;
            InitialEnMessages.JobText      = JobTextEn;
            InitialEnMessages.Company      = CompanyEn;
            InitialEnMessages.ActivitiesID = ActivitiesID;
            InitialEnMessages.Url          = Url;
            //InitialEnMessages.PhotoExtension
            InitialEnMessages.SocialStatus    = SocialStatus;
            InitialEnMessages.EducationLevel  = EducationLevel;
            InitialEnMessages.EmpNo           = EmpNo;
            InitialEnMessages.HasSmsService   = HasSmsService;
            InitialEnMessages.HasEmailService = HasEmailService;
            //InitialEnMessages.Notes1
            //InitialEnMessages.Notes2
            InitialEnMessages.AgeRang          = AgeRang;
            InitialEnMessages.ItemDate         = ItemDate;
            InitialEnMessages.YoutubeCode      = YoutubeCode;
            InitialEnMessages.GoogleLatitude   = GoogleLatitude.ToString();
            InitialEnMessages.GoogleLongitude  = GoogleLongitude.ToString();
            InitialEnMessages.Price            = Price;
            InitialEnMessages.KeyWords         = EnItemSeoKeyWords;
            InitialEnMessages.LastModification = DateTime.Now;
            #endregion
        }