예제 #1
0
        protected void EBtnSubmit_Click(object sender, EventArgs e)
        {
            M_Group info = new M_Group();

            if (Mid > 0)
            {
                info = bll.SelReturnModel(Mid);
            }
            info.GroupName    = this.TxtGroupName.Text.Trim();
            info.Description  = this.TxtDescription.Text.Trim();
            info.RegSelect    = RBLReg.Checked;
            info.UpGradeMoney = DataConverter.CDouble(UpGradeMoney.Text);
            info.UpSIcon      = DataConverter.CDouble(UpSIcon_T.Text);
            info.UpPoint      = DataConverter.CDouble(UpPoint_T.Text);
            info.OtherName    = this.OtherName.Text;
            info.CompanyGroup = RBcompanyG.Checked ? 1 : 0;
            info.RebateRate   = DataConverter.CFloat(this.txtRebateRate.Text.Trim());
            info.Credit       = DataConverter.CLng(txtCreit.Text);
            info.Enroll       = "";
            if (txt_Enroll.Checked)
            {
                info.Enroll = "isenroll";
            }
            if (!string.IsNullOrEmpty(ClassEnroll_Radio.SelectedValue))
            {
                info.Enroll += "," + ClassEnroll_Radio.SelectedValue;
            }
            info.Enroll   = info.Enroll.Trim(',');
            info.VIPGroup = RBVipG.Checked ? 1 : 0;
            info.VIPNum   = Convert.ToInt32(this.txtVIPNum.Text.ToString());
            if (info.GroupID > 0)
            {
                bll.Update(info);
            }
            else
            {
                info.ParentGroupID = ParentID;
                info.IsDefault     = (!bll.HasGroup());
                bll.Add(info);
            }
            function.WriteSuccessMsg("操作成功", "GroupManage.aspx");
        }