Inheritance: System.MarshalByRefObject, ITable
Exemple #1
0
        private void FillFormData()
        {
            if (CurId == 0)
            {
                AlertAndTransfer("参数id无效!", base.UrlReferrer);
                return;
            }

            ITable biz = new TableBiz();
            var entity = biz.GetTableEntity(CurId);
            if (entity == null)
            {
                AlertAndTransfer("参数id无效,获取数据失败!", base.UrlReferrer);
                return;
            }

            this.tTableName.Value = entity.TABLE_NAME;
            this.ddlRestaurant.SelectedValue = entity.RESTAURANT_ID.ToString();
        }
Exemple #2
0
        private void Save()
        {
            try
            {
                ITable biz = new TableBiz();
                var entity = new TableEntity();
                entity.TABLE_NAME = this.tTableName.Value;
                entity.RESTAURANT_ID = base.ParseInt(this.ddlRestaurant.SelectedValue);

                if (CurOperation == "add")
                    biz.InsertTableEntity(entity);
                else if (CurOperation == "edit")
                {
                    entity.TABLE_ID = CurId;
                    biz.UpdateTableEntity(entity);
                }

                AlertAndTransfer("保存成功!", base.UrlReferrer);
            }
            catch (Exception ex)
            {
                this.lMsg.InnerText = "保存失败,原因:" + ex.ToString();
            }
        }