Beispiel #1
0
 private void ShowInfo(int Id)
 {
     WebDemo.BLL.WebDemo.GridViewColumnInfo   bll   = new WebDemo.BLL.WebDemo.GridViewColumnInfo();
     WebDemo.Model.WebDemo.GridViewColumnInfo model = bll.GetModel(Id);
     this.lblId.Text             = model.Id.ToString();
     this.lblGridViewTypeID.Text = model.GridViewTypeID.ToString();
     this.lblColumnID.Text       = model.ColumnID.ToString();
     this.lblDataField.Text      = model.DataField;
     this.lblHeaderText.Text     = model.HeaderText;
     this.lblDataFormat.Text     = model.DataFormat;
     this.lblSortExpression.Text = model.SortExpression;
     this.lblIsEdit.Text         = model.IsEdit?"是":"否";
     this.lblIsShow.Text         = model.IsShow?"是":"否";
     this.lblOrderNum.Text       = model.OrderNum.ToString();
     this.lblOperatorID.Text     = model.OperatorID.ToString();
     this.lblRemark.Text         = model.Remark;
 }
Beispiel #2
0
 private void ShowInfo(int Id)
 {
     WebDemo.BLL.WebDemo.GridViewColumnInfo   bll   = new WebDemo.BLL.WebDemo.GridViewColumnInfo();
     WebDemo.Model.WebDemo.GridViewColumnInfo model = bll.GetModel(Id);
     this.lblId.Text             = model.Id.ToString();
     this.lblGridViewTypeID.Text = model.GridViewTypeID.ToString();
     this.txtColumnID.Text       = model.ColumnID.ToString();
     this.lblDataField.Text      = model.DataField;
     this.txtHeaderText.Text     = model.HeaderText;
     this.txtDataFormat.Text     = model.DataFormat;
     this.txtSortExpression.Text = model.SortExpression;
     this.chkIsEdit.Checked      = model.IsEdit;
     this.chkIsShow.Checked      = model.IsShow;
     this.txtOrderNum.Text       = model.OrderNum.ToString();
     this.lblOperatorID.Text     = model.OperatorID.ToString();
     this.txtRemark.Text         = model.Remark;
 }
Beispiel #3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtGridViewTypeID.Text))
            {
                strErr += "GridViewTypeID格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtColumnID.Text))
            {
                strErr += "ColumnID格式错误!\\n";
            }
            if (this.txtDataField.Text.Trim().Length == 0)
            {
                strErr += "DataField不能为空!\\n";
            }
            if (this.txtHeaderText.Text.Trim().Length == 0)
            {
                strErr += "HeaderText不能为空!\\n";
            }
            if (this.txtDataFormat.Text.Trim().Length == 0)
            {
                strErr += "DataFormat不能为空!\\n";
            }
            if (this.txtSortExpression.Text.Trim().Length == 0)
            {
                strErr += "SortExpression不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtOrderNum.Text))
            {
                strErr += "OrderNum格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtOperatorID.Text))
            {
                strErr += "OperatorID格式错误!\\n";
            }
            if (this.txtRemark.Text.Trim().Length == 0)
            {
                strErr += "Remark不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int    GridViewTypeID = int.Parse(this.txtGridViewTypeID.Text);
            int    ColumnID       = int.Parse(this.txtColumnID.Text);
            string DataField      = this.txtDataField.Text;
            string HeaderText     = this.txtHeaderText.Text;
            string DataFormat     = this.txtDataFormat.Text;
            string SortExpression = this.txtSortExpression.Text;
            bool   IsEdit         = this.chkIsEdit.Checked;
            bool   IsShow         = this.chkIsShow.Checked;
            int    OrderNum       = int.Parse(this.txtOrderNum.Text);
            int    OperatorID     = int.Parse(this.txtOperatorID.Text);
            string Remark         = this.txtRemark.Text;

            WebDemo.Model.WebDemo.GridViewColumnInfo model = new WebDemo.Model.WebDemo.GridViewColumnInfo();
            model.GridViewTypeID = GridViewTypeID;
            model.ColumnID       = ColumnID;
            model.DataField      = DataField;
            model.HeaderText     = HeaderText;
            model.DataFormat     = DataFormat;
            model.SortExpression = SortExpression;
            model.IsEdit         = IsEdit;
            model.IsShow         = IsShow;
            model.OrderNum       = OrderNum;
            model.OperatorID     = OperatorID;
            model.Remark         = Remark;

            WebDemo.BLL.WebDemo.GridViewColumnInfo bll = new WebDemo.BLL.WebDemo.GridViewColumnInfo();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }