コード例 #1
0
ファイル: RatingGroup.aspx.cs プロジェクト: arash7388/Anaraki
        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;
                    }
                }
            }
        }
コード例 #2
0
ファイル: RatingUC.ascx.cs プロジェクト: arash7388/Anaraki
        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);
            }
        }