Esempio n. 1
0
File: cred.cs Progetto: xyecom/AMS
 /// <summary>
 /// ��ȡ�������ü���������
 /// </summary>
 protected override void BindData()
 {
     info = new Business.CreditLeavlManager().GetItemByPoint(shopuserinfo.creditintegral);
     if (info != null)
     {
         credImag = info.ImagePath;
     }
 }
Esempio n. 2
0
        protected void btnOk_Click(object sender, EventArgs e)
        {
            string type = this.hidType.Value;

            int downPoint = XYECOM.Core.MyConvert.GetInt32(this.txtDownPoint.Text);
            Model.CreditLeavlInfo lastInfo = creditLeavlManager.GetLastItem();

            if (type == "add")
            {
                Model.CreditLeavlInfo info = new Model.CreditLeavlInfo();

                if (lastInfo == null)
                {
                    info.Leavl = 1;
                }
                else
                {
                    info.Leavl = lastInfo.Leavl + 1;
                    lastInfo.UpPoint = downPoint - 1;
                }

                info.LeavlName = this.txtLeavlName.Text;
                info.ImagePath = this.txtImagePath.Text;
                info.DownPoint = downPoint;
                info.UpPoint = -1;
                creditLeavlManager.Insert(info);
            }
            else
            {
                lastInfo = creditLeavlManager.GetLastItem();

                lastInfo.LeavlName = this.txtLeavlName.Text;
                lastInfo.ImagePath = this.txtImagePath.Text;
                lastInfo.UpPoint = -1;
                lastInfo.DownPoint = downPoint;
            }

            creditLeavlManager.Update(lastInfo);

            Response.Redirect("CreaditLeavlList.aspx");
        }