protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { var repo = new RatingGroupRepository(); gridRatingGroups.DataSource = repo.GetAll(); gridRatingGroups.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (Request.QueryString["Id"] != null) { var repo = new RatingGroupRepository(); var toBeEditedRatingGroup = repo.GetById(Request.QueryString["Id"].ToSafeInt()); if (toBeEditedRatingGroup != null) { txtName.Text = toBeEditedRatingGroup.Name; } } } }
protected void Page_Load(object sender, EventArgs e) { try { var repo = new RatingGroupRepository(); var rg = repo.GetById(RatingGroupId); if (rg == null) { throw new LocalException("Rating Group not found", "آیتم رای گیری یافت نشد"); } //lblRatingText.Text = rg.Name; //RadRating1.Value = repo.GetRatingGroupCurrentValue(RatingGroupId).ToSafeDecimal(); } catch (LocalException ex) { //Console.WriteLine(localException); } }