예제 #1
0
        private void BindData()
        {
            GroupSchemesEntity entity = new GroupSchemesBLL().GetSingle(this.SchemeID, this.GroupID);

            this.txtSchemeID.Text        = entity.SchemeID.ToString();
            this.txtGroupID.Text         = entity.GroupID.ToString();
            this.txtGroupTypeID.Text     = entity.GroupTypeID.ToString();
            this.txtOrderType.Text       = entity.OrderType.ToString();
            this.ddlStatus.SelectedValue = entity.Status.ToString();
        }
예제 #2
0
        private void BindData()
        {
            int totalCount = 0;

            List <GroupSchemesEntity> list = new GroupSchemesBLL().GetGroupSchemesList(this.ActType, pagerList.StartRecordIndex - 1, pagerList.PageSize, ref totalCount);

            this.objRepeater.DataSource = list;
            this.objRepeater.DataBind();

            pagerList.RecordCount = totalCount;
            pagerList.DataBind();
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (this.SchemeID != 0 && this.GroupID != 0)
                {
                    bool result = new GroupSchemesBLL().Delete(new GroupSchemesEntity()
                    {
                        SchemeID = this.SchemeID, GroupID = this.GroupID
                    });

                    this.Alert(result == true ? "删除成功" : "删除失败");
                }
                this.BindData();
            }
        }
예제 #4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            bool result = false;

            GroupSchemesEntity entity = new GroupSchemesEntity();

            entity.SchemeID    = this.txtSchemeID.Text.Convert <int>();
            entity.GroupID     = this.txtGroupID.Text.Convert <int>();
            entity.GroupTypeID = this.txtGroupTypeID.Text.Convert <int>();
            entity.OrderType   = this.txtOrderType.Text.Convert <int>();
            entity.Status      = this.ddlStatus.SelectedValue.Convert <int>(0);

            if (this.Action == "Edit")
            {
                result = new GroupSchemesBLL().Update(entity);
            }

            else if (this.Action == "Add")
            {
                result = new GroupSchemesBLL().Insert(entity);
            }

            this.Alert(result == true ? "操作成功" : "操作失败", "GroupSchemesList.aspx?acttype=2");
        }