PDA

View Full Version : توضیح کد



nn9090
دوشنبه 16 بهمن 1391, 23:31 عصر
سلام
کسی میتونه این کد رو خط به خط به من توضیح بده؟؟؟؟ مرسی

GridViewRow row = (GridViewRow)((LinkButton)e.CommandSource).NamingC ontainer;
LinkButton lbl1 = (LinkButton)row.FindControl("LinkBtnNId");
// NewsFunction.NewsIdFancy = Convert.ToInt16(lbl1.Text);
// var ddd = newsclass.newstables.FirstOrDefault(ss => ss.Id == NewsFunction.NewsIdFancy);
//////porbazdidtarin_______________________
NewsFunction.NewsIdFancy = Convert.ToInt32(lbl1.Text);
var update = newsclass.newstables.FirstOrDefault(s => s.Id == NewsFunction.NewsIdFancy);
update.Clickcount = update.Clickcount + 1;
newsclass.SubmitChanges();
//
LblText.Text = update.Text;
LblTitle.Text = update.Title;
LblDate.Text = update.DetailDate;
LblWriter.Text = update.Writer;
Image1.ImageUrl = "~/Images/" + NewsFunction.NewsIdFancy + ".png";