コード例 #1
0
        public List <Artical> GetAllArticals()
        {
            List <Artical> allArticals = new List <Artical>();
            string         fileName    = FilesPath.GetDirectoryPathArtica;

            if (File.Exists(fileName))
            {
                using (StreamReader reader = File.OpenText(fileName))
                {
                    string line;
                    while ((line = reader.ReadLine()) != null)
                    {
                        string[] lineData = line.Split(',');
                        Artical  a        = new Artical();
                        a.Name     = lineData[0];
                        a.Quantity = int.Parse(lineData[1]);
                        a.Price    = double.Parse(lineData[2]);
                        allArticals.Add(a);
                    }
                }
            }
            else
            {
                Console.WriteLine("File {0} dont exist.", fileName);
            }
            return(allArticals);
        }
コード例 #2
0
        private async Task ContentDialogshow()
        {
            ContentDialog contentDialog = new ContentDialog();

            contentDialog.Title               = "确认提交??";
            contentDialog.PrimaryButtonText   = "提交";
            contentDialog.SecondaryButtonText = "不提交";
            contentDialog.PrimaryButtonClick += async(_s, _e) =>
            {
                string  articaltext = ArticalTitle.Text;
                string  content     = ArticalContent.Text;
                var     gridview    = (Label)labelview.Items[0];
                string  label       = gridview.Labelname;
                Artical artical     = new Artical
                {
                    Userid         = myStruct.id,
                    UseridName     = HomePage.Current.people.Name,
                    ArticalTitle   = articaltext,
                    ArticalContent = content,
                    Label0         = label,
                };

                artical.ArticalTime = artical.ArticalUPTime = DateTime.Now;
                await PostArtical(artical);
            };
            contentDialog.SecondaryButtonClick += (_s, _e) =>
            {
            };
            await contentDialog.ShowAsync();
        }
コード例 #3
0
        public void CostCalculation(bool needNds)
        {
            double cost;

            switch (Artical.ToLower())
            {
            case "laptop":
                cost = 1500;
                break;

            case "ssd 120gb":
                cost = 100;
                break;

            case "monitor lg":
                cost = 200;
                break;

            case "usb":
                cost = 10;
                break;

            default:
                Console.WriteLine("there is no information");
                return;
            }
            if (needNds)
            {
                cost = cost * 2;
            }
            Console.WriteLine("cost ={0} $", cost * Quantity);
        }
コード例 #4
0
        public ActionResult Create(int id)
        {
            Artical a = new Artical();
            var     p = db.Publications.Find(id);

            a.Publication   = p;
            a.PublicationID = p.PublicationID;
            return(View(a));
        }
コード例 #5
0
        public bool CheckQuantity(Artical artical)
        {
            Artical art = GetArticalByName(artical.Name);

            if (art.Quantity < artical.Quantity)
            {
                return(false);
            }
            return(true);
        }
コード例 #6
0
 public ActionResult Create(Artical a)
 {
     if (ModelState.IsValid)
     {
         db.Articals.Add(a);
         db.SaveChanges();
         return(RedirectToAction("index", new { id = a.PublicationID }));
     }
     return(View(a));
 }
コード例 #7
0
        public ActionResult Artical_post(Artical Art_edit)
        {
            //using (ArticalDataEntities1 sq = new ArticalDataEntities1())
            //{
            //    var data = from p in sq.Artical
            //               select p;
            //}

            return(View());
        }
コード例 #8
0
        public override Artical ReadArtical(ArticalOverview overview, HtmlDocument doc)
        {
            var container = Helper.AnyChild(doc.DocumentNode, "div", "content");

            if (container == null)
            {
                return(null);
            }

            var artical = new Artical()
            {
                MyLink = overview.LinkOfActualArtical
            };

            var titleNode = Helper.AnyChild(Helper.AnyChild(container, "div", "posthead"), "h1", "headline");

            artical.Title = HtmlEntity.DeEntitize(titleNode.InnerText);

            var conNode = Helper.AnyChild(container, "div", "post_content");

            artical.HtmlText = $"<html><head></head><body>{conNode.InnerHtml}</body></html>";

            var authorNode = Helper.AnyChild(Helper.AnyChild(container, "div", "author-bio"), "a");

            artical.Authors = new Author[]
            {
                new Author()
                {
                    Name = HtmlEntity.DeEntitize(authorNode.InnerText),
                    Link = authorNode.GetAttributeValue("href", "")
                }
            };

            var relatedPostNode = Helper.AnyChild(container, "div", "yarpp-related");

            if (relatedPostNode != null)
            {
                var re     = new List <ArticalOverview>();
                var aLinks = Helper.AllChild(relatedPostNode, "a", new SearchCritriaBuilder().AddNotHasChild(new ChildNode()
                {
                    Name = "img"
                }).Build());
                foreach (var aL in aLinks)
                {
                    re.Add(new ArticalOverview()
                    {
                        LinkOfActualArtical = aL.GetAttributeValue("href", ""),
                        Title = HtmlEntity.DeEntitize(aL.InnerText)
                    });
                }
                artical.RelatedPosts = re.ToArray();
            }
            return(artical);
        }
コード例 #9
0
 public ActionResult Edit(Artical a)
 {
     if (ModelState.IsValid)
     {
         var old = db.Articals.Find(a.ArticallD);
         old.ArticalName     = a.ArticalName;
         old.Fillters        = a.Fillters;
         db.Entry(old).State = System.Data.Entity.EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("index", new { id = a.PublicationID }));
     }
     return(View(a));
 }
コード例 #10
0
        public void AddNewArtical(Artical artical)
        {
            string         fileName    = FilesPath.GetDirectoryPathArtica;
            List <Artical> articalList = GetAllArticals();

            articalList.Add(artical);

            using (StreamWriter writer = new StreamWriter(fileName, false, Encoding.UTF8))
            {
                foreach (Artical a in articalList)
                {
                    writer.WriteLine("{0},{1},{2}", a.Name, a.Quantity, a.Price);
                }
            }
        }
コード例 #11
0
        public static void BuyArticals()
        {
            List <Artical> listOfArticals = new List <Artical>();

            using (Service1Client service = new Service1Client())
            {
                while (true)
                {
                    Console.WriteLine("\nIf you want to quit, press q:");
                    Console.WriteLine("\nIf you do not want any new articles, press x:");
                    Console.WriteLine("\nElse\nInsert name of artical:");
                    string input = Console.ReadLine();

                    if (input.ToLower() == "x")
                    {
                        if (listOfArticals.Count > 0)
                        {
                            numOfBill++;
                            service.AddArticalToBill(listOfArticals.ToArray(), numOfBill);
                        }
                        break;
                    }
                    else if (input.ToLower() == "q")
                    {
                        break;
                    }

                    Artical a = service.GetArticalByName(input);
                    if (a == null)
                    {
                        Console.WriteLine("We dont have artical under the name: {0}", input.ToUpper());
                        continue;
                    }
                    Console.WriteLine("\nInsert quantity of artical:");
                    int inputQuantity = Validation.ValidateInt();
                    a.Quantity = inputQuantity;
                    if (service.CheckQuantity(a))
                    {
                        listOfArticals.Add(a);
                    }
                    else
                    {
                        Console.WriteLine("We do not have the desired amount of : {0}", input.ToUpper());
                        continue;
                    }
                }
            }
        }
コード例 #12
0
        public void UpdateArtical(Artical artical)
        {
            string         fileName    = FilesPath.GetDirectoryPathArtica;
            List <Artical> articalList = GetAllArticals();

            using (StreamWriter writer = new StreamWriter(fileName, false, Encoding.UTF8))
            {
                foreach (Artical art in articalList)
                {
                    if (art.Name == artical.Name)
                    {
                        art.Price = artical.Price;
                    }
                    writer.WriteLine("{0},{1},{2}", art.Name, art.Quantity, art.Price);
                }
            }
        }
コード例 #13
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            await NameMap.Read();

            if (e.Parameter is Artical)
            {
                artical = (Artical)e.Parameter;
                await GetComment(artical.Userid, artical.Articalid);
            }
            else if (e.Parameter is ArtComment artComment)
            {
                await GetComment(artComment.Userid, artComment.Articalid, artComment);

                FromPage = 1;
            }
            base.OnNavigatedTo(e);
        }
コード例 #14
0
        public static void ChangePriceOfArtical()
        {
            using (Service1Client service = new Service1Client())
            {
                Console.WriteLine("Insert artical name:");
                string  name    = Console.ReadLine();
                Artical artical = service.GetArticalByName(name);
                if (artical == null)
                {
                    Console.WriteLine("Artical by name {0} doesn't exists!", name.ToUpper());
                    return;
                }
                Console.WriteLine("Insert new price for {0} :", name);
                artical.Price = Validation.ValidateInput();

                service.UpdateArtical(artical);
            }
        }
コード例 #15
0
        private Artical GetArticalRow(DataRow dataRow)
        {
            Artical artical = new Artical
            {
                Articalid      = Convert.ToInt32(dataRow["Articalid"]),
                Userid         = Convert.ToInt32(dataRow["Userid"]),
                ArticalContent = dataRow["ArticalContent"].ToString(),
                ArticalTitle   = dataRow["ArticalTitle"].ToString(),
                UseridName     = dataRow["Username"].ToString(),
                ArtCmtnum      = Convert.ToInt32(dataRow["ArtCmtnum"]),
                ArticalTime    = Convert.ToDateTime(dataRow["ArticalPTime"]),
                ArticalUPTime  = Convert.ToDateTime(dataRow["ArticalUPTime"]),
                DownArtnum     = Convert.ToInt32(dataRow["DownArtnum"]),
                UpArtnum       = Convert.ToInt32(dataRow["UpArtnum"]),
                Label0         = dataRow["Label0"].ToString(),
            };

            return(artical);
        }
コード例 #16
0
        private async Task PostArtical(Artical artical)
        {
            HttpClient httpClient = new HttpClient();

            httpClient.DefaultRequestHeaders.Clear();
            httpClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));
            var content = new StringContent(JsonConvert.SerializeObject(artical), Encoding.UTF8, "application/json");
            HttpResponseMessage httpResponseMessage = await httpClient.PostAsync("http://localhost:60671/api/artical/newartical", content);

            if (httpResponseMessage.IsSuccessStatusCode)
            {
                var res = await httpResponseMessage.Content.ReadAsAsync <bool>();

                if (res == true)
                {
                    SendArtical.IsEnabled = false;
                }
            }
        }
コード例 #17
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            await NameMap.Read();

            base.OnNavigatedTo(e);
            if (e.Parameter is Artical)
            {
                artical = (Artical)e.Parameter;
                if (artical.Userid == people.UserId)
                {
                    AddFriendIcon.IsEnabled = false;
                }
                else
                {
                    await GetisFollow(artical.Userid);
                }
            }
            this.Bindings.Update();
        }
コード例 #18
0
ファイル: AddArtical.cs プロジェクト: AbedGhrayeb/FmCorona
            public async Task <Unit> Handle(AddArticalCommand request, CancellationToken cancellationToken)
            {
                var artical = new Artical
                {
                    CreateAt         = DateTime.UtcNow,
                    Details          = request.Vm.Details,
                    ImgUrl           = _filesAccessor.UploadFile(request.Vm.Image, "articls"),
                    ShortDescription = request.Vm.ShortDescription,
                    Title            = request.Vm.Title
                };

                _context.Articals.Add(artical);
                var result = await _context.SaveChangesAsync() > 0;

                if (result)
                {
                    return(Unit.Value);
                }
                throw new Exception("Proplem Saving Changes");
            }
コード例 #19
0
        public static void AddNewArtical()
        {
            using (Service1Client service = new Service1Client())
            {
                Artical a = new Artical();
                Console.WriteLine("Insert artical name:");
                a.Name = Console.ReadLine();
                if (service.GetArticalByName(a.Name) != null)
                {
                    Console.WriteLine("Artical by name {0} already exists!", a.Name.ToUpper());
                    return;
                }
                Console.WriteLine("Insert quantity of artical:");
                a.Quantity = Validation.ValidateInt();
                Console.WriteLine("Insert price of artical:");
                a.Price = Validation.ValidateInput();

                service.AddNewArtical(a);
            }
        }
コード例 #20
0
        private void updateArtical(Artical artical)
        {
            MyLog.Log(this, nameof(updateArtical) + "...");
            if (artical != null)
            {
                MyLog.Log(this, "Updating db isSeen history" + "...");
                database.UpdateIsSeen(UidGenerator(), articalOverview);//TODO: Sent a notification to overview fragment as the data shown successful
                MyLog.Log(this, "Updating db isSeen history" + "...Done");

                currentArtical = artical;//cache the data

                if (string.IsNullOrEmpty(artical.ExternalFileLink))
                {
                    MyLog.Log(this, $"Updating artical data text url {artical.MyLink} " + "...");
                    articalContentWebview.LoadData(artical.HtmlText, "text/html", "utf-8");
                    MyLog.Log(this, $"Updating artical data text url {artical.MyLink} " + "...Done");
                }
                else
                {
                    MyLog.Log(this, $"Updating artical data extrnal url {artical.MyLink} \t link {artical.ExternalFileLink}" + "...");
                    articalContentWebview.LoadUrl("file:///android_asset/pdfviewer/index.html?file=" + System.Net.WebUtility.UrlDecode(artical.ExternalFileLink));
                    MyLog.Log(this, $"Updating artical data extrnal url {artical.MyLink} \t link {artical.ExternalFileLink}" + "...Done");
                }

                articalContentWebview.Settings.DefaultFontSize = 20;
                loadingTextView.Visibility       = ViewStates.Gone;
                articalContentWebview.Visibility = ViewStates.Visible;
                Title = artical.Title;
                articalDateTextview.Text  = GetHumanReadableDate(artical.Date);
                articalTitleTextview.Text = artical.Title;
                toolBar.Title             = artical.Title;
            }
            else
            {
                loadingTextView.Text = "Unable to load artical";
                loadingTextView.SetTextColor(Android.Graphics.Color.Red);
            }

            MyLog.Log(this, nameof(updateArtical) + "...Done");
        }
コード例 #21
0
        private void updateArtical(Artical artical)
        {
            MyLog.Log(this, nameof(updateArtical) + "...");
            currentArtical = artical;//cache the data

            if (string.IsNullOrEmpty(artical.ExternalFileLink))
            {
                //MyLog.Log(this, $"Updating artical data text url {artical.MyLink} " + "...");
                //articalContentTextview.Gravity = GravityFlags.Left;
                //articalContentTextview.TextFormatted = Android.Text.Html.FromHtml(artical.HtmlText);//TODO: Add an image getter for getting images from web. Use Picasso to download image and use custom memory cache.
                //articalContentTextview.GetFocusedRect(new Android.Graphics.Rect(0, 0, 1, 1));

                //adapter.NotifyDataSetChanged();

                //articalContentTextview.Visibility = ViewStates.Visible;
                //if (articalContentWebview != null) articalContentWebview.Visibility = ViewStates.Gone;
                //MyLog.Log(this, $"Updating artical data text url {artical.MyLink} " + "...Done");

                articalContentWebview.LoadData(artical.HtmlText, "text/html", "utf-8");
                articalContentTextview.Visibility = ViewStates.Gone;
                articalContentWebview.Visibility  = ViewStates.Visible;
            }
            else
            {
                MyLog.Log(this, $"Updating artical data extrnal url {artical.MyLink} \t link {artical.ExternalFileLink}" + "...");
                articalContentWebview.LoadUrl("file:///android_asset/pdfviewer/index.html?file=" + System.Net.WebUtility.UrlDecode(artical.ExternalFileLink));
                articalContentWebview.Settings.DefaultFontSize = 20;
                articalContentTextview.Visibility = ViewStates.Gone;
                articalContentWebview.Visibility  = ViewStates.Visible;
                MyLog.Log(this, $"Updating artical data extrnal url {artical.MyLink} \t link {artical.ExternalFileLink}" + "...Done");
            }
            //if (artical.RelatedPosts != null)
            //    gridview.LayoutParameters.Height = artical.RelatedPosts.Length * dpToPx(70);

            Title = artical.Title;
            articalDateTextview.Text  = GetHumanReadableDate(artical.Date);
            articalTitleTextview.Text = artical.Title;
            MyLog.Log(this, nameof(updateArtical) + "...Done");
        }
コード例 #22
0
        /// <summary>
        /// 发表文章
        /// </summary>
        /// <param name="artical"></param>
        /// <returns></returns>
        public bool PostArtical(Artical artical)
        {
            SqlConnection sqlConnection = new SqlConnection(connectionstring);

            sqlConnection.Open();
            using (SqlCommand sqlCommand = sqlConnection.CreateCommand())
            {
                SqlTransaction sqlTransaction = sqlConnection.BeginTransaction();
                try
                {
                    string sql = "insert into ArticalTable(Userid,ArticalTitle,ArticalContent,ArticalPTime,ArticalUPTime,Label0,Username) values(@Userid,@ArticalTitle,@ArticalContent,@ArticalPTime,@ArticalUPTime,@label0,@Username);" +
                                 "update UserTable set Publishnum =Publishnum+1 where Userid=@Userid";
                    sqlCommand.CommandText = sql;
                    sqlCommand.Transaction = sqlTransaction;
                    sqlCommand.Parameters.AddWithValue("@Userid", artical.Userid);
                    sqlCommand.Parameters.AddWithValue("@ArticalTitle", artical.ArticalTitle);
                    sqlCommand.Parameters.AddWithValue("@ArticalContent", artical.ArticalContent.ToString());
                    sqlCommand.Parameters.AddWithValue("@ArticalPTime", artical.ArticalTime);
                    sqlCommand.Parameters.AddWithValue("@ArticalUPTime", artical.ArticalUPTime);
                    sqlCommand.Parameters.AddWithValue("@label0", artical.Label0);
                    sqlCommand.Parameters.AddWithValue("@Username", artical.UseridName);
                    sqlCommand.ExecuteNonQuery();
                    sqlTransaction.Commit();
                    return(true);
                }
                catch (SqlException)
                {
                    sqlTransaction.Rollback();
                    return(false);
                }
                finally
                {
                    sqlConnection.Close();
                }
            }
        }
コード例 #23
0
 public void ArticalProcessedCallback(string uid, string url, Artical artical)
 {
     RunOnUiThread(new Action(() => { updateArtical(artical); }));
 }
コード例 #24
0
        private void Articallist_ItemClick(object sender, ItemClickEventArgs e)
        {
            Artical artical = (Artical)e.ClickedItem;

            Frame.Navigate(typeof(ArticalShow), artical);
        }
コード例 #25
0
ファイル: Seed.cs プロジェクト: AbedGhrayeb/FmCorona
        public static async Task SeedData(DataContext context, RoleManager <IdentityRole> roleManager, UserManager <AppUser> userManager)
        {
            if (!await roleManager.Roles.AnyAsync())
            {
                var admin    = new IdentityRole("admin");
                var employee = new IdentityRole("employee");
                var user     = new IdentityRole("user");
                await roleManager.CreateAsync(admin);

                await roleManager.CreateAsync(employee);

                await roleManager.CreateAsync(user);
            }

            if (!await userManager.Users.AnyAsync())
            {
                var admin = new AppUser
                {
                    UserName       = "******",
                    Email          = "*****@*****.**",
                    LockoutEnabled = false
                };
                await userManager.CreateAsync(admin, "Corona.1234");

                await userManager.AddToRoleAsync(admin, "admin");

                var emp = new AppUser
                {
                    UserName       = "******",
                    Email          = "*****@*****.**",
                    FullName       = "tast tast",
                    LockoutEnabled = false
                };
                await userManager.CreateAsync(emp, "test.1234");

                await userManager.AddToRoleAsync(admin, "user");
            }

            if (!await context.Articals.AnyAsync())
            {
                var artical = new Artical
                {
                    Title            = "Sample Title",
                    ShortDescription = "Lorem Ipsum is simply dummy text of the printing and typesetting industry",
                    Details          = "Lorem Ipsuis simply dummy text of the printing and typesetting industrym . Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum"
                };
                context.Articals.Add(artical);
                await context.SaveChangesAsync();
            }
            if (!await context.Artists.AnyAsync())
            {
                var artist = new Artist
                {
                    Id   = "a",
                    Name = "Artist",
                };
                context.Artists.Add(artist);
                await context.SaveChangesAsync();
            }


            if (!await context.Topics.AnyAsync())
            {
                var topic = new Topic
                {
                    Title = "About Us",
                    Body  = "Lorem Ipsuis simply dummy text of the printing and typesetting industrym . Lorem Ipsum has been the industry's standard dummy text ever since the 1500s"
                };
                context.Topics.Add(topic);
                await context.SaveChangesAsync();
            }

            //if (!await context.Presenters.AnyAsync())
            //{
            //    var presenter = new Presenter
            //    {
            //        FirstName = "first",
            //        LastName = "last",
            //        Bio = "Lorem Ipsuis simply dummy text of the printing and typesetting industrym"
            //    };
            //    context.Presenters.Add(presenter);
            //    await context.SaveChangesAsync();
            //}

            if (!await context.Programs.AnyAsync())
            {
                var presenter = new Presenter
                {
                    FirstName = "first",
                    LastName  = "last",
                    Bio       = "Lorem Ipsuis simply dummy text of the printing and typesetting industrym"
                };
                var program = new Program
                {
                    Description = "Lorem Ipsuis simply dummy text of the printing and typesetting industrym",
                    Name        = "Corona Online",
                    Presenter   = presenter,
                };
                var episode = new Episode
                {
                    Duration  = 60,
                    Guest     = true,
                    GuestName = "Guest",
                    Number    = 1,
                    ShowDate  = DateTime.Now,
                    Title     = "Title1",
                    Url       = "episode link",
                    Program   = program
                };

                context.Presenters.Add(presenter);
                context.Programs.Add(program);
                context.Episodes.Add(episode);

                await context.SaveChangesAsync();
            }
        }
コード例 #26
0
        private void ArticalList_ItemClick(object sender, ItemClickEventArgs e)
        {
            Artical artical = (Artical)e.ClickedItem;

            HomePage.Current.ContentViewFrame.Navigate(typeof(ArticalShow), artical);
        }
コード例 #27
0
        public override Artical ReadArtical(ArticalOverview overview, HtmlDocument doc)
        {
            //TODO: Fix the single cote (') bug in http://taxguru.in/chartered-accountant/hey-examinee-thy-duty-result-thy-concern.html
            //TODO: Fix bug http://taxguru.in/company-law/download-annual-fillingxbrleforms.html

            var container = Helper.AnyChild(doc.DocumentNode, "div", "latestPosts main-box latestPostsBg");

            if (container == null)
            {
                return(null);
            }

            var artical = new Artical()
            {
                MyLink = overview.LinkOfActualArtical
            };

            var aLinkTitle = Helper.AnyChild(Helper.AnyChild(container, "div", "homeTitle margint-10"), "a");

            artical.Title = HtmlEntity.DeEntitize(aLinkTitle.GetAttributeValue("title", ""));

            var aLinkAuthor = Helper.AnyChild(Helper.AnyChild(container, "li", "postAuthor"), "a");

            artical.Authors = new Author[]
            {
                new Author()
                {
                    Name = aLinkAuthor.InnerText,
                    Link = aLinkAuthor.GetAttributeValue("href", "")
                }
            };

            var aLinkDate = Helper.AnyChild(Helper.AnyChild(container, "li", "MetapostDate"), "a");

            artical.Date = getFormatedDate(aLinkDate.InnerText);

            var relatedPostContainer = Helper.AnyChild(container, "div", "rp4wp-related-posts rp4wp-related-post");
            var aLinkRelatedPosts    = Helper.AllChild(relatedPostContainer, "a");

            if (aLinkRelatedPosts != null)
            {
                var reletedPost = new List <ArticalOverview>();
                foreach (var aNode in aLinkRelatedPosts)
                {
                    reletedPost.Add(
                        new ArticalOverview()
                    {
                        LinkOfActualArtical = aNode.GetAttributeValue("href", ""),
                        Title = aNode.InnerText
                    });
                }
                artical.RelatedPosts = reletedPost.ToArray();
            }

            var articalContainer = Helper.AnyChild(container, "div", "fsize16");

            if (relatedPostContainer != null)
            {
                articalContainer.RemoveChild(relatedPostContainer);
            }
            //HtmlNode node = HtmlNode.CreateNode("<div></div>");
            //var pNodes = Helper.AllChild(articalContainer, "p");
            //foreach (var pNode in pNodes)
            //    node.AppendChild(pNode);
            artical.HtmlText = $"<html><head><link rel='stylesheet' id='custom-css' href='http://taxguru.in/wp-content/themes/tg4/style.css?ver=4.5.1' type='text/css' media='all' /></head><body>{ articalContainer.InnerHtml}</body></html>";

            return(artical);
        }