コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["adminid"] != null)
            {
                if (!IsPostBack)
                {
                    string id = this.Page.RouteData.Values["id"].ToString();
                    if (!String.IsNullOrEmpty(id))
                    {
                        SliderRepository repSr = new SliderRepository();

                        Slider oldSlider = repSr.FindSlider(id.ToInt());
                        oldBimg.Src = oldSlider.BackgroundImg;
                        if (oldSlider.thumbnail != null)
                        {
                            Rimg.InnerHtml = "<img src='" + oldSlider.thumbnail + "' class='img-responsive'/>";
                        }
                        else
                        {
                            Rimg.InnerHtml = "عکسی وجود نداشته !";
                        }
                        text.Text    = oldSlider.Text;
                        tbxLink.Text = oldSlider.Link;
                    }
                    else
                    {
                        Response.Redirect("/Admin/ManageFirstPage");
                    }
                }
            }
            else
            {
                Response.Redirect("/AdminLogin");
            }
        }
コード例 #2
0
ファイル: SliderController.cs プロジェクト: nanasupiana/PPOB2
        public async Task <ActionResult> Create(MasterSlider model)
        {
            try
            {
                //byte[] bytes = System.Convert.FromBase64String(model.Photo);

                SliderRepository Repository  = new SliderRepository();
                string           ImageLoc    = model.Photo;
                string           ImageNewLoc = ImageLoc.Remove(0, 12);
                string           ImageName   = FilePath.FilePathSlider + ImageNewLoc;
                var result = await Repository.CreateSlider(ImageName, model.Judul, model.DesSingkat, model.DesPanjang, User.Identity.Name);

                if (result == true)
                {
                    return(await GetList());
                }
                else
                {
                    return(View(result));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine("{0} Exception caught.", e);
                return(View(false));
            }
        }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["adminid"] != null)
     {
         if (!IsPostBack)
         {
             SliderRepository repSlider = new SliderRepository();
             gvSlider.DataSource = repSlider.LoadSliders();
             gvSlider.DataBind();
             ContactUsRepository repContact = new ContactUsRepository();
             ContactWay          cnw        = repContact.Findcwy(1);
             tbxAbout.Text     = cnw.AboutUs;
             tbxAdress.Text    = cnw.Adrees;
             tbxMail.Text      = cnw.Email;
             tbxPhone.Text     = cnw.PhoneNumber;
             tbxAboutPage.Text = cnw.AboutPage;
             tbxInsta.Text     = cnw.Instagram;
             tbxtele.Text      = cnw.Telegram;
             AdminsRepository ad    = new AdminsRepository();
             DataAccess.Admin admin = ad.getAdmin(Session["adminid"].ToString().ToInt());
             tbxPass.Text = admin.Password;
         }
     }
     else
     {
         Response.Redirect("/AdminLogin");
     }
 }
コード例 #4
0
        protected void gvSlider_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            gvSlider.PageIndex = e.NewPageIndex;
            SliderRepository repSlider = new SliderRepository();

            gvSlider.DataSource = repSlider.LoadSliders();
            gvSlider.DataBind();
        }
コード例 #5
0
ファイル: SliderController.cs プロジェクト: nanasupiana/PPOB2
        // GET: Operator
        public async Task <ActionResult> GetList()
        {
            SliderRepository Repository = new SliderRepository();

            ViewData["ListSlider"] = await Repository.GetSlider();

            return(PartialView("_SimpleGrid"));
        }
コード例 #6
0
ファイル: SliderBL.cs プロジェクト: yoorke/zrchiptuning
 public int Save(Slider slider)
 {
     SliderRepository sliderRepository = new SliderRepository();
     if (slider.ID > 0)
         return sliderRepository.Update(slider);
     else
         return sliderRepository.Insert(slider);
 }
コード例 #7
0
 public UnitOfWork()
 {
     CartProducts = new CartsProductsRepository();
     Carts        = new CartRepository();
     Categories   = new CategoryRepository();
     Orders       = new OrderRepository();
     Sliders      = new SliderRepository();
     Admins       = new AdminRepository();
     Producsts    = new ProductsRepository();
     Users        = new UserRepository();
     Logs         = new LogsRepository();
 }
コード例 #8
0
        public int Save(Slider slider)
        {
            SliderRepository sliderRepository = new SliderRepository();

            if (slider.ID > 0)
            {
                return(sliderRepository.Update(slider));
            }
            else
            {
                return(sliderRepository.Insert(slider));
            }
        }
コード例 #9
0
ファイル: UnitOfWork.cs プロジェクト: pacmad/OpenDoors
 public UnitOfWork(ContextDb context)
 {
     this.context = context;
     Language     = new LanguageRepository(context);
     LanguageData = new LanguageDataRepository(context);
     Partners     = new PartnerRepository(context);
     Photo        = new PhotoRepository(context);
     Slider       = new SliderRepository(context);
     Volunteer    = new VolunteerRepository(context);
     Gallery      = new GalleryRepository(context);
     News         = new NewsRepository(context);
     Tag          = new TagRepository(context);
 }
コード例 #10
0
        public void _sliderDelete(int id)
        {
            var res = new SliderRepository().FindbyIdandDisable(id);

            if (res == Enum.EntityResult.Failed)
            {
                this.AddToastMessage("", "Slider silinirken hata", Enum.ToastrType.Error);
            }
            else
            {
                this.AddToastMessage("", "Slider silme başarılı", Enum.ToastrType.Success);
            }
        }
コード例 #11
0
 public UnitOfWork(HeroContext context)
 {
     _context         = context;
     Contacts         = new ContactRepository(_context);
     Users            = new UserRepository(context);
     Roles            = new RoleRepository(context);
     Orders           = new OrderRepository(context);
     OrderDetails     = new OrderDetailRepository(context);
     Products         = new ProductRepository(_context);
     Categories       = new CategoryRepository(_context);
     Sliders          = new SliderRepository(_context);
     ProductDiscounts = new ProductDiscountRepository(_context);
     Countries        = new CountryRepository(_context);
 }
コード例 #12
0
        // Constructor de la clase aplicando el archivo dbcontext o contexto de la base de datos
        public ContenedorTrabajo(ApplicationDbContext db)
        {
            _db = db;
            // Se pasan cada una de las entidades en el constructor pasandole el contexto de datos

            Vendedor = new VendedorRepository(_db);
            TipoGranContribuyente = new TipoGranContribuyenteRepository(_db);
            Ciudad   = new CiudadRepository(_db);
            Clientes = new ClientesRepository(_db);

            Categoria = new CategoriaRepository(_db);
            Articulo  = new ArticuloRepository(_db);
            Slider    = new SliderRepository(_db);
            Usuario   = new UsuarioRepository(_db);
        }
コード例 #13
0
        public ActionResult SliderEdit(Slider modified)
        {
            if (!ModelState.IsValid)
            {
                this.AddToastMessage("", "Alanları kontrol Ediniz", Enum.ToastrType.Warning);
                return(View("SliderCreate", modified));
            }
            var res = new SliderRepository().Update(modified);

            if (res == Enum.EntityResult.Failed)
            {
                this.AddToastMessage("", "Slider güncellenirken hata", Enum.ToastrType.Error);
                return(View("SliderCreate", modified));
            }

            this.AddToastMessage("", "Kayıt Başarılı", Enum.ToastrType.Success);
            return(RedirectToAction("Slider"));
        }
コード例 #14
0
        private void LoadSliders()
        {
            SliderRepository repSlider = new SliderRepository();
            Slider           slide1    = repSlider.FindSlider(1);
            Slider           slide2    = repSlider.FindSlider(2);
            Slider           slide3    = repSlider.FindSlider(3);

            bImg1.Src = slide1.BackgroundImg;
            bImg2.Src = slide2.BackgroundImg;
            bImg3.Src = slide3.BackgroundImg;

            divText1.InnerHtml = slide1.Text;
            divText2.InnerHtml = slide2.Text;
            divText3.InnerHtml = slide3.Text;

            if (slide1.thumbnail != null)
            {
                rightPic.InnerHtml = "<img src='" + slide1.thumbnail + "' alt='عکس'/>";
            }
            if (slide2.thumbnail != null)
            {
                rightPic2.InnerHtml = "<img src='" + slide2.thumbnail + "' alt='عکس'/>";
            }
            if (slide3.thumbnail != null)
            {
                rightPic3.InnerHtml = "<img src='" + slide3.thumbnail + "' alt='عکس'/>";
            }

            if (slide1.Link != null)
            {
                diva1.InnerHtml = "<a type='button' href='" + slide1.Link + "' class='btn btn-default'>بیشتر بدانید</a>";
            }
            if (slide2.Link != null)
            {
                diva2.InnerHtml = "<a type='button' href='" + slide2.Link + "' class='btn btn-default'>بیشتر بدانید</a>";
            }
            if (slide3.Link != null)
            {
                diva3.InnerHtml = "<a type='button' href='" + slide3.Link + "' class='btn btn-default'>بیشتر بدانید</a>";
            }
        }
コード例 #15
0
ファイル: SliderController.cs プロジェクト: nanasupiana/PPOB2
        public async Task <ActionResult> Delete(MasterSlider model)
        {
            try
            {
                SliderRepository Repository = new SliderRepository();
                var result = await Repository.DeleteSlider(model.ID);

                if (result == true)
                {
                    return(await GetList());
                }
                else
                {
                    return(View(result));
                }
            }
            catch
            {
                return(View(false));
            }
        }
コード例 #16
0
        public ActionResult SliderCreate(Slider model, HttpPostedFileBase uploadedFile)
        {
            if (!ModelState.IsValid)
            {
                this.AddToastMessage("", "Alanları kontrol Ediniz", Enum.ToastrType.Warning);
                return(View(model));
            }
            if (uploadedFile == null)
            {
                this.AddToastMessage("", "Görsel seçmelisiniz", Enum.ToastrType.Warning);
                return(View(model));
            }
            if (uploadedFile.ContentLength < 0)
            {
                this.AddToastMessage("", "Görsel seçmelisiniz", Enum.ToastrType.Warning);
                return(View(model));
            }

            var file = FileSave(uploadedFile, "Slider", Enum.FileType.Media);

            if (file == null)
            {
                this.AddToastMessage("", "Görsel yüklenirken hata!", Enum.ToastrType.Error);
                return(View(model));
            }
            model.AuthorId = new AuthenticatedAuthor().Id;
            model.FileId   = file.Id;
            var res = new SliderRepository().Create(model);

            if (res == Enum.EntityResult.Failed)
            {
                this.AddToastMessage("", "Slider oluşturulurken hata", Enum.ToastrType.Error);
                return(View(model));
            }

            this.AddToastMessage("", "Kayıt Başarılı", Enum.ToastrType.Success);
            return(RedirectToAction("Slider"));
        }
コード例 #17
0
ファイル: SliderController.cs プロジェクト: nanasupiana/PPOB2
        public async Task <ActionResult> Edit(MasterSlider model)
        {
            try
            {
                string           ImagePath  = "E:/Uploads" + "/" + model.Photo;
                byte[]           ImageData  = System.IO.File.ReadAllBytes(ImagePath);
                SliderRepository Repository = new SliderRepository();
                var result = await Repository.EditSlider(model.ID, ImageData, model.Judul, model.DesSingkat, model.DesPanjang);

                if (result == true)
                {
                    return(await GetList());
                }
                else
                {
                    return(View(result));
                }
            }
            catch
            {
                return(View(false));
            }
        }
コード例 #18
0
 public SliderRepositoryTests()
 {
     SetupMocks();
     _sliderRepository = new SliderRepository(_context);
 }
コード例 #19
0
        #pragma warning disable 1998
        public async override global::System.Threading.Tasks.Task ExecuteAsync()
        {
            BeginContext(0, 552, true);
            WriteLiteral(@"<style>
    .btn1:hover {
        box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19) !important;
        background-color: #fff !important;
        color: deepskyblue !important
    }

    .btn2:hover {
        box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19) !important;
        background-color: #fff !important;
        color: darkblue !important
    }

    .box1:hover {
        box-shadow: 0 12px 16px 0 rgba(0,0,0,0.24), 0 17px 50px 0 rgba(0,0,0,0.19) !important;
    }
</style>
");
            EndContext();
#line 18 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"

            ViewBag.Title = "سایت آموزشی فارسی پرشین لرنینگ";
            SliderRepository    RepSlider    = new SliderRepository();
            TopicRepository     RepTopic     = new TopicRepository();
            MovieRepository     RepMovie     = new MovieRepository();
            CourseRepository    RepCourse    = new CourseRepository();
            ProfessorRepository RepProfessor = new ProfessorRepository();

#line default
#line hidden
            BeginContext(907, 417, true);
            WriteLiteral(@"<header>


    <div class=""container"">
        <div class=""row"">
            <div class=""col-lg-5 col-sm-12"" style=""text-align:center"">

                <div id=""myCarousel"" class=""carousel slide"" data-ride=""carousel"" style=""background-color:whitesmoke;margin-top:100px;margin-bottom:30px;border-radius:45px;opacity:0.9;padding-top:15px;padding-bottom:15px"">
                    <div class=""carousel-inner"">
");
            EndContext();
#line 35 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            foreach (var item in RepSlider.GetSlider().Take(4))
            {
#line default
#line hidden
                BeginContext(1429, 122, true);
                WriteLiteral("                            <div class=\"item \">\r\n                                <div style=\"font-weight:bold;color:blue\">");
                EndContext();
                BeginContext(1552, 10, false);
#line 38 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(item.Title);

#line default
#line hidden
                EndContext();
                BeginContext(1562, 199, true);
                WriteLiteral("</div>\r\n                                <h4><small>: مرور کلی</small></h4>\r\n                                <ul style=\"direction:rtl;text-align:right;list-style-type:none;font-size:14px!important\">\r\n");
                EndContext();
#line 41 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                foreach (var item1 in RepTopic.GetAll().Take(4))
                {
#line default
#line hidden
                    BeginContext(1887, 130, true);
                    WriteLiteral("                                        <li>\r\n                                            <span class=\"fa fa-check\"></span>&nbsp; ");
                    EndContext();
                    BeginContext(2018, 11, false);
#line 44 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                    Write(item1.Title);

#line default
#line hidden
                    EndContext();
                    BeginContext(2029, 49, true);
                    WriteLiteral("\r\n                                        </li>\r\n");
                    EndContext();
#line 46 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                }

#line default
#line hidden
                BeginContext(2117, 347, true);
                WriteLiteral(@"                                    <li>
                                        <span class=""fa fa-check""></span>&nbsp;  و...
                                    </li>
                                </ul>
                                <div style=""text-align:right;padding-right:30px"">
                                    <h4>تعداد قسمت : ");
                EndContext();
                BeginContext(2465, 11, false);
#line 52 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(item.Number);

#line default
#line hidden
                EndContext();
                BeginContext(2476, 84, true);
                WriteLiteral(" &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</h4>\r\n                                    <h4>مدرس: ");
                EndContext();
                BeginContext(2561, 14, false);
#line 53 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(item.Professor);

#line default
#line hidden
                EndContext();
                BeginContext(2575, 201, true);
                WriteLiteral("</h4>\r\n                                </div>\r\n                                <div class=\"author-img mb20\" style=\"height:150px;width:150px;margin-left:150px\">\r\n                                    <img");
                EndContext();
                BeginWriteAttribute("src", " src=\"", 2776, "\"", 2794, 1);
#line 56 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                WriteAttributeValue("", 2782, item.ImgUrl, 2782, 12, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("alt", " alt=\"", 2795, "\"", 2810, 1);
#line 56 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                WriteAttributeValue("", 2801, item.Alt, 2801, 9, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(2811, 538, true);
                WriteLiteral(@"/>
                                </div>
                                <button style=""border-radius:20px;color:white;background-color:deepskyblue;outline:none;margin-bottom:8px!important"" href=""#"" class=""btn btn-default btn1"" type=""button"">افزودن به سبد خرید</button>
                                <button style=""border-radius:20px;color:white;background-color:darkblue;outline:none;margin-bottom:8px!important"" href=""#"" class=""btn btn-danjer btn2"" type=""button"">مشاهده جزئیات دوره</button>

                            </div>
");
                EndContext();
#line 62 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(3376, 541, true);
            WriteLiteral(@"                    </div>
                </div>
            </div>
        </div>
    </div>
</header>




<br />
<div class=""container row wow fadeInDown"">
    <p class=""col-lg-2"" style=""margin-top:25px;text-align:center;font-size:15px;padding:5px;background-color:white;border-radius:10px;border:1px solid lightgray;color:darkblue"">فیلم های پیشنهادی ما</p>
    <div class=""col-lg-10"" style=""margin-top:40px;height:1px;background:lightgray""></div>
</div>
<div class=""container row wow fadeInDown"" style=""margin-top:30px"">
");
            EndContext();
#line 79 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            foreach (var itemMovie in RepMovie.GetMovie().Take(3))
            {
#line default
#line hidden
                BeginContext(3985, 225, true);
                WriteLiteral("        <div class=\"col-lg-4\" style=\"text-align:center\">\r\n            <div class=\"single-course\" style=\"background-color:#fff\">\r\n                <video controls style=\"width:90%;padding-top:20px\">\r\n                    <source");
                EndContext();
                BeginWriteAttribute("src", " src=\"", 4210, "\"", 4235, 1);
#line 84 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                WriteAttributeValue("", 4216, itemMovie.MovieUrl, 4216, 19, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(4236, 292, true);
                WriteLiteral(@" type=""video/mp4"">
                    <source src=""mov_bbb.ogg"" type=""video/ogg"">
                    Your browser does not support HTML5 video.
                </video>
                <div style=""position:absolute;top:10px;right:20px;background-color:deeppink;color:white;padding:6px"">");
                EndContext();
                BeginContext(4529, 15, false);
#line 88 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemMovie.State);

#line default
#line hidden
                EndContext();
                BeginContext(4544, 137, true);
                WriteLiteral("</div>\r\n                <div class=\"w3-container w3-center\" style=\"padding-bottom:15px\">\r\n                    <h5 style=\"color:darkblue\">");
                EndContext();
                BeginContext(4682, 15, false);
#line 90 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemMovie.Title);

#line default
#line hidden
                EndContext();
                BeginContext(4697, 38, true);
                WriteLiteral("</h5>\r\n                    <h5>مدرس : ");
                EndContext();
                BeginContext(4736, 19, false);
#line 91 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemMovie.Professor);

#line default
#line hidden
                EndContext();
                BeginContext(4755, 67, true);
                WriteLiteral("</h5>\r\n                </div>\r\n            </div>\r\n        </div>\r\n");
                EndContext();
#line 95 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(4829, 1844, true);
            WriteLiteral(@"
</div>




<section class=""section-padding wow fadeInDown"">
    <div class=""container"">
        <div class=""row"">
            <div class=""col-md-8 col-lg-8 col-md-offset-2 col-lg-offset-2 col-sm-12 col-xs-12"">
                <div class=""text-center wow fadeIn"">
                    <h2 class=""xs-font20"" style=""color:darkblue"">
                        سایت آموزشی فارسی
                        <span style=""color:white;width:150px;padding-right:10px;color: white;font-size: 38px;font-weight: bold;
                              font-family: 'A Afsaneh';text-shadow: 0 1px 0 #ccc, 0 2px 0 #c9c9c9, 0 3px 0 #bbb, 0 4px 0 #b9b9b9, 0 5px 0 #aaa, 0 6px 1px rgba(0,0,0,.1), 0 0 5px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.3), 0 3px 5px rgba(0,0,0,.2), 0 5px 10px rgba(0,0,0,.25), 0 10px 10px rgba(0,0,0,.2), 0 20px 20px rgba(0,0,0,.15);"">
                            <span style=""color:rebeccapurple;"">پی</span><span style=""color:mediumvioletred"">لرن</span>
                        </span>
                    </h");
            WriteLiteral(@"2><br /><br />
                    <p style=""font-size:16px;"">
                        سایت پرشین لرنینگ(پی لرن) سایتی کاملا فارسی برای فارسی زبانان ایران و جهان است.
                        این سایت ارایه دهنده کاملترین مجموعه های کمیاب و یا حتی نایاب آموزشی جهان است که توسط بهترین و مجرب ترین اساتید هر زمینه گردآوری گردیده است
                    </p>
                </div>
            </div>
        </div>
    </div>
</section>




<section class=""fun-fact-area center white relative padding-100-70"" id=""fact"">
    <div class=""area-bg"" data-stellar-background-ratio=""0.6""></div>
    <div class=""container"">
        <div class=""row"">
            <div class=""col-md-3 col-sm-6 col-xs-12"">
                <div class=""single-fun-fact mb30 wow fadeInUp"" data-wow-delay=""0.3s"">
                    ");
            EndContext();
            BeginContext(6673, 42, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "bf3c54f234924a9c99edf4172005bd81", async() => {
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_0);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(6715, 569, true);
            WriteLiteral(@"
                    <h4>مشاوره</h4>
                    <p style=""font-size:12px;padding-top:10px!important"">                کاربران می توانند در قسمت درباره ما و با انتخاب کارشناس مربوطه جهت مشاوره با وی تماس بگیرند</p>
                    <h3 class=""font60 xs-font26""><span class=""counter"">10</span></h3>
                    <p class=""font600""> مشاور</p>
                </div>
            </div>
            <div class=""col-md-3 col-sm-6 col-xs-12"">
                <div class=""single-fun-fact mb30 wow fadeInUp"" data-wow-delay=""0.1s"">
                    ");
            EndContext();
            BeginContext(7284, 42, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "2f00882f25f845b5a6c84839e6b55407", async() => {
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_2);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(7326, 605, true);
            WriteLiteral(@"
                    <h4>دعوت به همکاری</h4>
                    <p style=""font-size:12px;padding-top:10px!important"">
                        از متخصصان زمینه های برنامه نویسی جهت تهیه دوره های آموزشی خود و تدریس دعوت به عمل می آید
                    </p>
                    <h3 class=""font60 xs-font26""><span class=""counter"">20</span></h3>
                    <p class=""font600"">مدرس</p>
                </div>
            </div>
            <div class=""col-md-3 col-sm-6 col-xs-12"">
                <div class=""single-fun-fact mb30 wow fadeInUp"" data-wow-delay=""0.2s"">
                    ");
            EndContext();
            BeginContext(7931, 48, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "163683dabe8d4972903a43ef3fe0655e", async() => {
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_3);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(7979, 622, true);
            WriteLiteral(@"
                    <h4 style=""f"">شرکت در دوره </h4>
                    <p style=""font-size:12px;padding-top:10px!important"">
                        دانشجویان و دانش آموزان می توانند با انتخاب و شرکت در دوره آموزشی مورد نظر کسب دانش نمایند
                    </p>
                    <h3 class=""font60 xs-font26""><span class=""counter"">60</span></h3>
                    <p class=""font600"">دسته آموزشی</p>
                </div>
            </div>
            <div class=""col-md-3 col-sm-6 col-xs-12"">
                <div class=""single-fun-fact mb30 wow fadeInUp"" data-wow-delay=""0.4s"">
                    ");
            EndContext();
            BeginContext(8601, 42, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "1cb6e0a69ab4496694b031ebd35962ce", async() => {
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_4);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_1);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(8643, 987, true);
            WriteLiteral(@"
                    <h4>ثبت نام</h4>
                    <p style=""font-size:12px;padding-top:10px!important"">
                        کاربران وهمکاران جهت استفاده از دوره های آموزشی باید در سایت ثبت نام نمایند و یا وارد شوند
                    </p>
                    <h3 class=""font60 xs-font26""><span class=""counter"">900</span></h3>
                    <p class=""font600"">عضو فعال</p>
                </div>
            </div>
        </div>
    </div>
</section>





<section class=""course-area padding-top wow fadeInDown"" id=""courses"">
    <div class=""container-fluid"">
        <div class=""row"">
            <div class=""col-md-8 col-lg-8 col-md-offset-2 col-lg-offset-2 col-sm-12 col-xs-12"">
                <div class=""area-title text-center wow fadeIn"">
                    <h3 class=""xs-font26"" style=""color:darkblue"">جدیدترین ترین دوره های آموزشی</h3>
                </div>
            </div>
        </div>
        <div class=""row course-list"">
");
            EndContext();
#line 191 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            foreach (var itemCourse in RepCourse.GetCourse().Take(6))
            {
#line default
#line hidden
                BeginContext(9717, 187, true);
                WriteLiteral("                <div class=\"col-md-3 col-lg-3 col-sm-6 col-xs-12 \">\r\n                    <div class=\"single-course mb20 box1\" style=\"background-color:white\">\r\n                        <img");
                EndContext();
                BeginWriteAttribute("src", " src=\"", 9904, "\"", 9928, 1);
#line 195 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                WriteAttributeValue("", 9910, itemCourse.ImgUrl, 9910, 18, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("alt", " alt=\"", 9929, "\"", 9950, 1);
#line 195 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                WriteAttributeValue("", 9935, itemCourse.Alt, 9935, 15, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(9951, 171, true);
                WriteLiteral(">\r\n                        <div class=\"course-details padding30\">\r\n                            <h3 class=\"font18\" style=\"text-align:center;font-size:18px;color:darkblue\"> ");
                EndContext();
                BeginContext(10123, 16, false);
#line 197 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemCourse.Title);

#line default
#line hidden
                EndContext();
                BeginContext(10139, 84, true);
                WriteLiteral(" </h3>\r\n                            <p style=\"text-align:center;font-size:12px\">سطح ");
                EndContext();
                BeginContext(10224, 21, false);
#line 198 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemCourse.CourseType);

#line default
#line hidden
                EndContext();
                BeginContext(10245, 10, true);
                WriteLiteral(" با تدریس ");
                EndContext();
                BeginContext(10256, 20, false);
#line 198 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemCourse.Professor);

#line default
#line hidden
                EndContext();
                BeginContext(10276, 218, true);
                WriteLiteral("</p>\r\n                            <p class=\"mt30\"><a href=\"Htmlpage.html\" class=\"enroll-button main-button icon-button\" style=\"text-decoration:none\">مشاهده پکیج</a><span style=\"color:deepskyblue\" class=\"course-price\"> ");
                EndContext();
                BeginContext(10495, 16, false);
#line 199 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemCourse.Price);

#line default
#line hidden
                EndContext();
                BeginContext(10511, 162, true);
                WriteLiteral("</span><span style=\"color:deepskyblue\" class=\"course-price\">تومان</span></p>\r\n                        </div>\r\n                    </div>\r\n                </div>\r\n");
                EndContext();
#line 203 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(10688, 558, true);
            WriteLiteral(@"        </div>
    </div>
</section>




<section class=""blog-feed-area padding-top "" id=""blog"">
    <div class=""container"">
        <div class=""container row wow fadeInDown"">
            <p class=""col-lg-2"" style=""margin-top:25px;text-align:center;font-size:16px;padding:5px;background-color:white;border-radius:10px;border:1px solid lightgray;color:darkblue"">مدرسین مربوطه</p>
            <div class=""col-lg-10"" style=""margin-top:40px;height:1px;background:lightgray""></div>
        </div>

        <div class=""row"" style=""margin-top:50px"">
");
            EndContext();
#line 219 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            foreach (var itemProf in RepProfessor.GetProfessor())
            {
#line default
#line hidden
                BeginContext(11329, 306, true);
                WriteLiteral(@"                <div class=""col-md-4 col-lg-4 col-sm-12 col-xs-12"">
                    <div class=""single-blog-item sm-mb30 xs-mb30 wow fadeInUp"" data-wow-delay=""0.2s"" style=""background-image:url(/home/img/Body/55.png)"">
                        <div class=""blog-thumb"">
                            <img");
                EndContext();
                BeginWriteAttribute("src", " src=\"", 11635, "\"", 11657, 1);
#line 224 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                WriteAttributeValue("", 11641, itemProf.ImgUrl, 11641, 16, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginWriteAttribute("alt", " alt=\"", 11658, "\"", 11677, 1);
#line 224 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                WriteAttributeValue("", 11664, itemProf.Alt, 11664, 13, false);

#line default
#line hidden
                EndWriteAttribute();
                BeginContext(11678, 202, true);
                WriteLiteral(">\r\n                        </div>\r\n                        <div class=\"blog-details padding30\">\r\n                            <h3 class=\"blog-title font20 mb30\" style=\"text-align:center;font-size:22px\"> ");
                EndContext();
                BeginContext(11881, 13, false);
#line 227 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemProf.Name);

#line default
#line hidden
                EndContext();
                BeginContext(11894, 144, true);
                WriteLiteral(" </h3>\r\n                            <p class=\"blog-meta font14 mt20\" style=\"text-align:center;font-size:16px\">\r\n                                ");
                EndContext();
                BeginContext(12039, 17, false);
#line 229 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemProf.Evidence);

#line default
#line hidden
                EndContext();
                BeginContext(12056, 41, true);
                WriteLiteral("\r\n                                <br /> ");
                EndContext();
                BeginContext(12098, 14, false);
#line 230 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
                Write(itemProf.Skill);

#line default
#line hidden
                EndContext();
                BeginContext(12112, 644, true);
                WriteLiteral(@"
                            </p>
                            <br />
                            <a href=""#""><i id=""i"" class=""fa fa-telegram"" style=""color:deepskyblue;font-size:20px""></i></a>
                            <a href=""#""><i id=""i"" class=""fa fa-instagram"" style=""color:deeppink;font-size:20px""></i></a>
                            <a href=""#""><i id=""i"" class=""fa fa-google-plus"" style=""color:red;font-size:20px""></i></a>
                            <a href=""#""><i id=""i"" class=""fa fa-whatsapp"" style=""color:lightgreen;font-size:20px""></i></a>
                        </div>
                    </div>
                </div>
");
                EndContext();
#line 240 "C:\Users\Mohamad Pc\Desktop\Persian_Learning\PesianLearning\Views\Home\Index.cshtml"
            }

#line default
#line hidden
            BeginContext(12771, 260, true);
            WriteLiteral(@"
            <div class=""col-md-4 col-lg-4 col-sm-6 col-xs-12 hidden-sm"">
                <div class=""single-blog-item wow fadeInUp visible-sm"" data-wow-delay=""0.4s"">
                    <div class=""blog-thumb"">
                        <a href=""blog.html"">");
            EndContext();
            BeginContext(13031, 35, false);
            __tagHelperExecutionContext = __tagHelperScopeManager.Begin("img", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.StartTagOnly, "9805e997f43a4779a419978066ec014b", async() => {
            }
                                                                        );
            __Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper = CreateTagHelper <global::Microsoft.AspNetCore.Mvc.Razor.TagHelpers.UrlResolutionTagHelper>();
            __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_TagHelpers_UrlResolutionTagHelper);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_5);
            __tagHelperExecutionContext.AddHtmlAttribute(__tagHelperAttribute_6);
            await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);

            if (!__tagHelperExecutionContext.Output.IsContentModified)
            {
                await __tagHelperExecutionContext.SetOutputContentAsync();
            }
            Write(__tagHelperExecutionContext.Output);
            __tagHelperExecutionContext = __tagHelperScopeManager.End();
            EndContext();
            BeginContext(13066, 485, true);
            WriteLiteral(@"</a>
                    </div>
                    <div class=""blog-details padding30"">
                        <h3 class=""blog-title font20 mb30""><a href=""blog.html"">Blazeon Scrambles to Police Content Amid Rapid Growth</a></h3>
                        <p class=""blog-meta font14 mt20""><a href=""#"">Feb 01, 2016  </a> by <a href=""#"">Mark Stonis</a></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<br /><br />");
            EndContext();
        }
コード例 #20
0
        public ActionResult SliderEdit(int id)
        {
            var item = new SliderRepository().FindbyId(id);

            return(View("SliderCreate", item));
        }
コード例 #21
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string id = this.Page.RouteData.Values["id"].ToString();

            if (!String.IsNullOrEmpty(id))
            {
                SliderRepository repSlider = new SliderRepository();
                Slider           slider    = repSlider.FindSlider(id.ToInt());

                //slider.SlideID = id.ToInt();
                if (FileUpload1.HasFile)
                {
                    if (FileUpload1.FileBytes.Length > 1024 * 1024)
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' حجم عکس بیشتر از 1 مگابایت است ! ');", true);

                        return;
                    }
                    string ext = Path.GetExtension(FileUpload1.FileName).ToLower();
                    if ((ext != ".jpg") && (ext != ".png"))
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' فرمت png یا jpg kdsj ! ');", true);

                        return;
                    }
                    string filename = Path.GetFileName(FileUpload1.FileName);
                    string rand     = DBManager.CurrentTimeWithoutColons() + DBManager.CurrentPersianDateWithoutSlash();
                    filename = rand + filename;
                    string ps = Server.MapPath(@"~\img\") + filename;
                    FileUpload1.SaveAs(ps);
                    FileInfo fi = new FileInfo(Server.MapPath(@"~\img\") + slider.BackgroundImg.Substring(5));
                    fi.Delete();
                    slider.BackgroundImg = "/img/" + filename;
                }

                if (FileUpload2.HasFile)
                {
                    if (FileUpload2.FileBytes.Length > 1024 * 1024)
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' حجم عکس بیشتر از 1 مگابایت است ! ');", true);

                        return;
                    }
                    string ext = Path.GetExtension(FileUpload2.FileName).ToLower();
                    if ((ext != ".jpg") && (ext != ".png"))
                    {
                        ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert(' فرمت png یا jpg kdsj ! ');", true);

                        return;
                    }
                    string filename = Path.GetFileName(FileUpload2.FileName);
                    string rand     = DBManager.CurrentTimeWithoutColons() + DBManager.CurrentPersianDateWithoutSlash();
                    filename = rand + filename;
                    string ps = Server.MapPath(@"~\img\") + filename;
                    FileUpload2.SaveAs(ps);
                    FileInfo fi = new FileInfo(slider.thumbnail);
                    fi.Delete();
                    slider.thumbnail = "/img/" + filename;
                }
                if (CheckBox1.Checked == true)
                {
                    slider.thumbnail = null;
                }

                if (tbxLink.Text != "")
                {
                    slider.Link = tbxLink.Text;
                }
                else
                {
                    slider.Link = null;
                }
                if (text.Text != "")
                {
                    slider.Text = text.Text;
                }
                else
                {
                    slider.Text = "";
                }

                if (repSlider.SaveSlider(slider))
                {
                    Response.Redirect("/Admin/ManageFirstPage");
                }
                else
                {
                    ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "alertMessage", "alert' ثبت تغییرات با خطا مواجه شد !  ');", true);
                }
            }
        }
コード例 #22
0
        public static int GetFirstSlide()
        {
            ISliderRepository db = new SliderRepository();

            return(db.getAll().First().ID);
        }