Пример #1
0
        private void InitData(int id)
        {
            EtNet_BLL.ProductManager proBLL   = new EtNet_BLL.ProductManager();
            EtNet_Models.Product     proModel = proBLL.GetModel(id);

            txtBrief.Value  = Server.UrlDecode(proModel.Brief);
            txtMark.Value   = proModel.Remark;
            txtName.Value   = proModel.ProdName;
            chkMain.Checked = proModel.FlagMain;

            EtNet_BLL.ProductTypeManager proType = new EtNet_BLL.ProductTypeManager();
            txtType.Value = proType.GetModel(proModel.ProdTypeID).ProdTypeName;
        }
Пример #2
0
        //添加项目
        private bool AddProd(int id)
        {
            EtNet_BLL.ProductManager proBLL   = new EtNet_BLL.ProductManager();
            EtNet_Models.Product     proModel = new EtNet_Models.Product();

            proModel = proBLL.GetModel(id);

            proModel.Brief    = hidHtml.Value;
            proModel.FlagMain = chkMain.Checked;
            proModel.ProdName = txtName.Value;
            proModel.Remark   = txtMark.Value;
            try
            {
                return(proBLL.Update(proModel));
            }
            catch
            {
                return(false);
            }
        }