Beispiel #1
0
        private async void btnConfirm_Click(object sender, RoutedEventArgs e)
        {
            if (Current == null)
            {
                MessageBox.Show("请选择人员!");
                return;
            }

            ProjectStaffModel model = new ProjectStaffModel
            {
                DingId    = Current.DingId,
                ProjId    = ProjId,
                StartDate = (DateTime)dpStart.SelectedDate,
            };

            var ret = await proxy.PostMessage <OneResult <ProjectStaffModel> >("v1/oa/projstaff/assign", model);

            if (ret.HttpStatusCode == System.Net.HttpStatusCode.OK)
            {
                selectCallback(true, null);
                this.Close();
            }
            else
            {
                MessageBox.Show("添加失败!");
            }
        }
        private async void btnImport_Click(object sender, RoutedEventArgs e)
        {
            HttpProxy proxy = new HttpProxy(AppCache.Host);

            var ret = await proxy.PostMessage <BatchResult <CheckModel> >("v1/oa/checktime/ones", checkList, 60);

            if (ret.HttpStatusCode == System.Net.HttpStatusCode.OK)
            {
                MessageBox.Show("数据导入成功!");
            }
            else
            {
                MessageBox.Show("数据导入错误!" + ret.Error, "操作提示");
            }
        }