Exemplo n.º 1
0
        private void DataBindAll()
        {
            ddlTagID.Items.Add(new ListItem("PC", "0"));
            ddlTagID.Items.Add(new ListItem("手机", "1"));

            GamePropertyRelat relat = FacadeManage.aidePlatformFacade.GetGamePropertyRelat(IntParam);

            string where = relat != null ? " WHERE Nullity = 0 AND TagID = " + relat.TagID.ToString() : " WHERE Nullity = 0 AND TagID = 0";
            PagerSet typeList = FacadeManage.aidePlatformFacade.GetGamePropertyTypeList(1, Int32.MaxValue, where, " ORDER BY TypeID ASC");

            ddlTypeID.DataSource     = typeList.PageSet;
            ddlTypeID.DataValueField = "TypeID";
            ddlTypeID.DataTextField  = "TypeName";
            ddlTypeID.DataBind();
            ddlTypeID.Items.Insert(0, new ListItem("无", "0"));

            DataBindProperty(relat != null ? relat.TagID.ToString() : "0");

            if (relat != null)
            {
                ddlPropertyID.SelectedValue = relat.PropertyID.ToString();
                ddlTagID.SelectedValue      = relat.TagID.ToString();
                ddlTypeID.SelectedValue     = relat.TypeID.ToString();
            }
        }
Exemplo n.º 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            GamePropertyRelat relat = new GamePropertyRelat();

            relat.PropertyID = Convert.ToInt32(ddlPropertyID.SelectedValue);
            relat.TypeID     = Convert.ToInt32(ddlTypeID.SelectedValue);
            relat.TagID      = Convert.ToInt32(ddlTagID.SelectedValue);
            relat.ID         = IntParam;

            int result = 0;

            if (StrCmd == "add")
            {
                //判断权限
                AuthUserOperationPermission(Permission.Add);
                if (FacadeManage.aidePlatformFacade.GetExistGamePropertyRelat(relat))
                {
                    ShowError("道具对应关系已存在");
                    return;
                }
                result = FacadeManage.aidePlatformFacade.AddGamePropertyRelat(relat);
            }
            else
            {
                //判断权限
                AuthUserOperationPermission(Permission.Edit);
                result = FacadeManage.aidePlatformFacade.UpdateGamePropertyRelat(relat);
            }
            if (result > 0)
            {
                ShowInfo("道具关联操作成功", "GamePropertyRelatList.aspx", 1200);
            }
            else
            {
                ShowError("道具关联操作失败");
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// 修改道具关联对象
 /// </summary>
 /// <param name="relat"></param>
 /// <returns></returns>
 public int UpdateGamePropertyRelat(GamePropertyRelat relat)
 {
     return(aidePlatformData.UpdateGamePropertyRelat(relat));
 }
Exemplo n.º 4
0
 /// <summary>
 /// 新增道具关联对象
 /// </summary>
 /// <param name="relat"></param>
 /// <returns></returns>
 public int AddGamePropertyRelat(GamePropertyRelat relat)
 {
     return(aidePlatformData.AddGamePropertyRelat(relat));
 }
Exemplo n.º 5
0
 /// <summary>
 /// 道具关联对象是否存在
 /// </summary>
 /// <param name="relat"></param>
 /// <returns></returns>
 public bool GetExistGamePropertyRelat(GamePropertyRelat relat)
 {
     return(aidePlatformData.GetExistGamePropertyRelat(relat));
 }