Inheritance: System.MarshalByRefObject, IFoodType
Exemplo n.º 1
0
        private void BindControlData()
        {
            IRestaurant restaurantBiz = new RestaurantBiz();
            this.ddlRestaurant.DataSource = (bool)base.CurEmployeeEntity.IS_ADMIN ?
                restaurantBiz.GetRestaurantDataTable() :
                restaurantBiz.GetRestaurantDataTable(base.CurEmployeeEntity.EMPLOYEE_ID);
            this.ddlRestaurant.DataValueField = "RESTAURANT_ID";
            this.ddlRestaurant.DataTextField = "RESTAURANT_NAME";
            this.ddlRestaurant.DataBind();

            IFoodType foodTypeBiz = new FoodTypeBiz();
            this.ddlFoodType.DataSource = foodTypeBiz.GetFoodTypeDataTable();
            this.ddlFoodType.DataValueField = "FOOD_TYPE_ID";
            this.ddlFoodType.DataTextField = "FOOD_TYPE_NAME";
            this.ddlFoodType.DataBind();
        }
Exemplo n.º 2
0
 private void DeleteData()
 {
     try
     {
         var id = base.ParseInt(this.hDeleteId.Value);
         if (id != 0)
         {
             IFoodType biz = new FoodTypeBiz();
             biz.DeleteFoodTypeEntity(new FoodTypeEntity() { FOOD_TYPE_ID = id });
             this.lMsg.InnerText = "删除成功!";
         }
     }
     catch (Exception ex)
     {
         this.lMsg.InnerText = "删除失败,原因:" + ex.ToString();
     }
 }
Exemplo n.º 3
0
        private void FillFormData()
        {
            if (CurId == 0)
            {
                AlertAndTransfer("参数id无效!", base.UrlReferrer);
                return;
            }

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

            this.tFoodTypeName.Value = entity.FOOD_TYPE_NAME;
        }
Exemplo n.º 4
0
        private void Save()
        {
            try
            {
                IFoodType biz = new FoodTypeBiz();
                var entity = new FoodTypeEntity();
                entity.FOOD_TYPE_NAME = this.tFoodTypeName.Value;

                if (CurOperation == "add")
                    biz.InsertFoodTypeEntity(entity);
                else if (CurOperation == "edit")
                {
                    entity.FOOD_TYPE_ID = CurId;
                    biz.UpdateFoodTypeEntity(entity);
                }

                AlertAndTransfer("保存成功!", base.UrlReferrer);
            }
            catch (Exception ex)
            {
                this.lMsg.InnerText = "保存失败,原因:" + ex.ToString();
            }
        }
Exemplo n.º 5
0
 private void BindData()
 {
     IFoodType biz = new FoodTypeBiz();
     repeater1.DataSource = GetPagedDataSource(biz.GetFoodTypeDataTable().DefaultView);
     repeater1.DataBind();
 }