/// <summary>
        /// 删除
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            DigiPower.Onlinecol.Standard.BLL.T_DefineReult_BLL tbll = new DigiPower.Onlinecol.Standard.BLL.T_DefineReult_BLL();

            if (ctrlGridEx1.GetSelects().Count > 0)
            {
                for (int i = 0; i < ctrlGridEx1.GetSelects().Count; i++)
                {
                    tbll.Delete(Convert.ToInt32(ctrlGridEx1.GetSelects()[i]));
                }

                this.BindGridView();
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 绑定页面
        /// </summary>
        /// <param name="ID"></param>
        private void BindPage(string ID)
        {
            Model.T_DefineReult_MDL model = new DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL();

            BLL.T_DefineReult_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_DefineReult_BLL();

            model = bll.GetModel(DigiPower.Onlinecol.Standard.Common.ConvertEx.ToInt(ID));

            if (model != null)
            {
                DigiPower.Onlinecol.Standard.Web.Comm.SetValueToPage(model, this.tbl);
                ViewState["model"] = model;
                //  this.CanDefineTypeID.SelectValue = model.CanDefineTypeID.ToString();
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 保存
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void btnSave_Click(object sender, EventArgs e)
        {
            Model.T_DefineReult_MDL model = new DigiPower.Onlinecol.Standard.Model.T_DefineReult_MDL();

            BLL.T_DefineReult_BLL bll = new DigiPower.Onlinecol.Standard.BLL.T_DefineReult_BLL();
            if (ViewState["model"] != null)
            {
                model = (Model.T_DefineReult_MDL)ViewState["model"];
            }
            object obj = Comm.GetValueToObject(model, this.tbl);

            if (obj != null)
            {
                Model.T_DefineReult_MDL Newmodel = (Model.T_DefineReult_MDL)obj;

                switch ((CommonEnum.PageState)ViewState["ps"])
                {
                case CommonEnum.PageState.ADD:

                    Newmodel.CanDefineTypeID = DigiPower.Onlinecol.Standard.Common.ConvertEx.ToInt(this.CanDefineTypeID.SelectValue);

                    Newmodel.SplitID = DigiPower.Onlinecol.Standard.Common.ConvertEx.ToInt(this.SplitID.SelectValue);

                    bll.Add(Newmodel);

                    break;

                case CommonEnum.PageState.EDIT:
                {
                    Newmodel.DefineResultID = DigiPower.Onlinecol.Standard.Common.ConvertEx.ToInt(ID);

                    bll.Update(Newmodel);
                }

                break;
                }
            }

            Response.Redirect("DefinedList.aspx?sqlwhere=" + SqlWhere + "&PageIndex=" + pPageIndex + "");
        }