Пример #1
0
        private void btnSync_Click(object sender, EventArgs e)
        {
            var res = ThongTinTrungTamSync.GetThongTinTrungTam();

            if (!string.IsNullOrEmpty(res.StringError))
            {
                XtraMessageBox.Show(res.StringError, "BioNet Sàng Lọc Sơ Sinh", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            else
            {
                XtraMessageBox.Show("Cập nhật thông tin thành công! Vui lòng đăng nhập lại.", "BioNet Sàng Lọc Sơ Sinh", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Пример #2
0
        private void GetThongTinTrungTam()
        {
            this.rtbStatus.SelectionColor = Color.LightYellow;
            this.rtbStatus.AppendText(string.Concat(new object[] { DateTime.Now + " :Đang đồng bộ dữ liệu Trung tâm \r\n " }));
            var res = ThongTinTrungTamSync.GetThongTinTrungTam();

            if (res.Result)
            {
                this.rtbStatus.SelectionColor = Color.LightYellow;
                this.rtbStatus.AppendText(string.Concat(new object[] { DateTime.Now + " :đồng bộ dữ liệu Trung tâm thành công \r\n " }));
            }
            else
            {
                this.rtbStatus.SelectionColor = Color.Red;
                this.rtbStatus.AppendText(string.Concat(new object[] { DateTime.Now + " :đồng bộ dữ liệu Trung tâm KHÔNG thành công\r\n Lỗi chi tiết : \r\n" + res.StringError + "\r\n" }));
            }
            this.rtbStatus.ScrollToCaret();
        }
Пример #3
0
        private void PostThongTinTrungTam()
        {
            this.rtbStatus.SelectionColor = Color.LightYellow;
            this.rtbStatus.AppendText(string.Concat(new object[] { DateTime.Now + " :Đang đồng bộ dữ liệu Trung tâm \r\n " }));
            var res = ThongTinTrungTamSync.PostThongtinTrungTam();

            if (string.IsNullOrEmpty(res.StringError))
            {
                this.rtbStatus.SelectionColor = Color.LightYellow;
                this.rtbStatus.AppendText(string.Concat(new object[] { DateTime.Now + " :đồng bộ dữ liệu Trung tâm thành công \r\n " }));
            }
            else
            {
                this.rtbStatus.SelectionColor = Color.Red;
                this.rtbStatus.AppendText(string.Concat(new object[] { DateTime.Now + ":Thông tin chi tiết khi đồng bộ dữ liệu Thông tin Trung tâm \r\n" + res.StringError + "\r\n" }));
            }

            this.rtbStatus.ScrollToCaret();
        }