예제 #1
0
 public void creatUser()
 {
     bmob.Create(tableNameForUser, user, (resp2, exception2) =>
     {
         if (exception2 != null)
         {
             showMessagem("查询异常" + exception2.Message);
             return;
         }
         showMessagem("创建成功" + resp2.ToString());
         getUser();
     });
 }
        // 添加表记录
        private void create_Click(object sender, RoutedEventArgs e)
        {
            BmobApi record = new BmobApi();

            record.name = "hello bmob windowsphone";

            Bmob.Create(TABLE_NAME, record, (resp, ex) =>
            {
                string status = "OK";
                if (ex != null)
                {
                    status = "ERROR";
                }

                Dispatcher.BeginInvoke(() =>
                {
                    updateStatus(create, status);
                });
            });
        }
예제 #3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            JYCaoZuo.getCaoZuo().addaoZuo("任务评价页面 评价");

            if (txtForHuiFu.Text.Length < 3)
            {
                MessageBox.Show("评价内容太短啦");
                return;
            }

            if (JYCaoZuo.getCaoZuo().user.isJinYan == 1)
            {
                MessageBox.Show("您已被禁言!");
                JYCaoZuo.getCaoZuo().addaoZuo("任务评价页面 评价--被禁言");
                return;
            }

            RenWuHuiFu re = new RenWuHuiFu();

            re.renWuId      = renWuid;
            re.huiFuContet  = txtForHuiFu.Text;
            re.huiFuNiCheng = JYCaoZuo.getCaoZuo().user.niCheng;
            re.huiFuUserId  = JYCaoZuo.getCaoZuo().user.userId;
            re.isJinYan     = JYCaoZuo.getCaoZuo().user.isJinYan;
            re.zhiChi       = 0;

            BmobWindowsPhone bmob = JYCaoZuo.getCaoZuo().bmob;

            bmob.Create("RenWuHuiFu", re, (respon, exc) => {
                if (exc != null)
                {
                    return;
                }
                JYCaoZuo.getCaoZuo().showMessagemBox("回复成功,您的评论等待审核通过就能出现在评论列表。");
                this.Dispatcher.BeginInvoke(delegate {
                    freashData();
                });
            });
        }