예제 #1
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            frmRegister r = new frmRegister();

            r.Show();
            this.Hide();
        }
예제 #2
0
 private void frmHealthSelect_Load(object sender, EventArgs e)
 {
     try
     {
         frmRegister frm = new frmRegister();
         strOld   = Oldtext.oldtxt;
         intoldid = Oldtext.oldID;
         DateTime datenow = Program.GetServerDateTime();
         var      objmst_health_checkup = (from t1 in dbc.mst_health_checkups
                                           where t1.mhc_status == 'A' &&
                                           datenow >= t1.mhc_effective_date.Value &&
                                           (t1.mhc_expire_date != null ? (datenow <= t1.mhc_expire_date.Value) : true)
                                           select new
         {
             Code = t1.mhc_id,
             Name = t1.mhc_ename
         }).ToList();
         GvHealthSelect.DataSource            = objmst_health_checkup;
         GvHealthSelect.Columns[0].Visible    = false;
         GvHealthSelect.Columns[1].HeaderText = "Name";
         GvHealthSelect.Columns[1].Width      = 250;
         // this.ControlBox = false; //control
     }
     catch
     {
         return;
     }
 }
예제 #3
0
        private void buttonX_Register_Click(object sender, EventArgs e)
        {
            frmRegister callRegister = new frmRegister();

            callRegister.ShowDialog();
            load();
        }
예제 #4
0
        private void m_muRegister_Click(object sender, System.EventArgs e)
        {
            if (FindWindow("frmRegister"))
            {
                return;
            }
            this.Cursor          = Cursors.WaitCursor;
            this.toolTip1.Active = true;
            frmRegister frm = new frmRegister();

            frm.Show_MDI_Child(this);
            this.toolTip1.Active = false;
            this.Cursor          = Cursors.Default;
        }
예제 #5
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (Common.CheckRegister() == false)
            {
                MessageBox.Show("Phần mềm chưa được đăng ký sử dụng.Vui lòng đăng ký sử dụng phần mềm", "Thông báo");
                frmRegister frm = new frmRegister();
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    Application.Run(new frmAutoUpForum());
                }
            }
            else
            {
                Application.Run(new frmAutoUpForum());
            }
        }
예제 #6
0
        public static Boolean registerNewUser(string TeacherID, string TRole, string FirstName, string LastName, string Username, string Password, int UserRole)
        {
            frmRegister frmReg = new frmRegister();
            int         RoleID = (UserRole + 1);
            Boolean     str1, str2, str3;

            //Check Exist User
            if (!checkExistUser(Username, TeacherID))
            {
                //----------------- Insert Teacher Data -----------------
                strSQL = "INSERT INTO tblTeacher(" +
                         "TeacherID, TeacherFirstName, TeacherLastName, TeacherRole) " +
                         " VALUES(" +
                         " " + TeacherID + " ," +
                         "'" + FirstName + "'," +
                         "'" + LastName + "'," +
                         "'" + TRole + "'" +
                         ")";
                str1 = DoSQL(strSQL);

                //----------------- Insert User Data -----------------
                strSQL = "INSERT INTO tblUser(TeacherID, [Username], [Password], CreateByID) " +
                         " VALUES(" + TeacherID + ",'" + Username + "'," +
                         "'" + authentication.Hash512(Password, Username) + "'," + Settings.Default["UserID"] + ")";
                str2 = DoSQL(strSQL);

                //----------------- Insert User Role -----------------
                strSQL = "INSERT INTO tblUserRole(" +
                         " TeacherID, RoleID) " +
                         " VALUES( " + TeacherID + "," + RoleID + " )";
                str3 = DoSQL(strSQL);

                if (str1 && str2 && str3)
                {
                    MessageBoxAdv.Show("ลงทะเบียนเรียบร้อย.", "รายงานสถานะ", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return(true);
                }
            }
            return(false);
        }
예제 #7
0
        /// <summary>
        /// 验证输入信息是否合法
        /// </summary>
        /// <returns>是否合法</returns>
        public bool CheckValidity(frmRegister reg)
        {
            string[] checkFields = GetConfig.RM_CheckField.Split(';');
            foreach (string field in checkFields)
            {
                switch (field)
                {
                case "PATIENT_NAME":
                    if (reg.txt_PatientName.Text == null || reg.txt_PatientName.Text == "")
                    {
                        MessageBoxEx.Show("病人姓名不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_ID":
                    if (reg.txt_PatientId.Text == null || reg.txt_PatientId.Text == "")
                    {
                        MessageBoxEx.Show("病人ID不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_AGE":
                    if (reg.txt_Age.Text == "")
                    {
                        MessageBoxEx.Show("病人年龄不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_AGE_UNIT":
                    if (reg.cmb_AgeUnit.Text == "")
                    {
                        MessageBoxEx.Show("病人年龄单位不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_SEX":
                    if (reg.cmb_Sex.Text == "")
                    {
                        MessageBoxEx.Show("病人性别不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_BIRTH":
                    if (reg.dtp_Birth.Text == "")
                    {
                        MessageBoxEx.Show("病人出生年龄不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_PHONETIC":
                    if (reg.txt_PatientPhonetic.Text == "")
                    {
                        MessageBoxEx.Show("病人姓名拼音不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_LOCAL_ID":
                    if (reg.dud_PatientLocalId.Text == "")
                    {
                        MessageBoxEx.Show("病人检查号不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "CHARGE_TYPE":
                    if (reg.cmb_ChargeType.Text == "")
                    {
                        MessageBoxEx.Show("收费类别不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "PATIENT_SOURCE":
                    if (reg.cmb_PatientSource.Text == "")
                    {
                        MessageBoxEx.Show("病人来源不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "EXAM_CLASS":
                    if (reg.cmb_ExamClass.Text == "")
                    {
                        MessageBoxEx.Show("检查类别不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "EXAM_SUB_CLASS":
                    if (reg.cmb_ExamSubClass.Text == "")
                    {
                        MessageBoxEx.Show("检查子类不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "EXAM_ITEMS":
                    string examItems = "";
                    if (GetConfig.DALAndModel == "SIS")
                    {
                        SIS_Model.MWorkList smWorkList = (SIS_Model.MWorkList)reg.iWorkList;
                        examItems = smWorkList.EXAM_ITEMS;
                    }
                    else
                    {
                        PACS_Model.MWorkList pmWorkList = (PACS_Model.MWorkList)reg.iWorkList;
                        examItems = pmWorkList.EXAM_ITEMS;
                    }
                    if (examItems == "")
                    {
                        MessageBoxEx.Show("检查项目不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "EXAM_GROUP":
                    if (reg.cmb_ExamGroup.Text == "")
                    {
                        MessageBoxEx.Show("检查组不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "DEVICE":
                    if (reg.cmb_ImgEquipment.Text == "")
                    {
                        MessageBoxEx.Show("检查设备不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "REFER_DOCTOR":
                    if (reg.cmb_ReferDoctor.Text == "")
                    {
                        MessageBoxEx.Show("申请医生不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "REFER_DEPT":
                    if (reg.cmb_ReferDept.Text == "")
                    {
                        MessageBoxEx.Show("申请科室不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "COSTS":
                    if (reg.txt_Costs.Text == "")
                    {
                        MessageBoxEx.Show("标准收费不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;

                case "CHARGES":
                    if (reg.txt_Charges.Text == "")
                    {
                        MessageBoxEx.Show("实收费用不能为空!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                        return(false);
                    }
                    break;
                }
            }
            return(true);
        }
예제 #8
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            //
            path = Application.StartupPath;
            //注册表
            Registry();

            //
            Helper.Appsetting.path = Application.StartupPath;
            Helper.Appsetting.app_ini();
            //处理未捕获的异常
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
            //处理UI线程异常
            Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
            //处理非UI线程异常
            AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
            try
            {
                //验证程序
                //if (SoftUpdate.VerifySoft() != 1)
                //{
                //    MessageBox.Show("没有找到加密狗!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //    System.Environment.Exit(0);
                //}


                //检查服务器
                IBLL.ICommonBLL bll = new BLL.CommonBLL();
                if ("0".Equals(bll.IsServer()))
                {
                    //var frmFindServer = new MainForm.frmFindServer();
                    //frmFindServer.ShowDialog();
                    MsgForm.ShowFrom("无法连接到服务器,请检查服务器连接");
                    return;
                }

                //更新中间件 手动验证
                if (!Debugger.IsAttached)
                {
                    SoftUpdate.Upadte();
                }

                //检查机号
                frmRegister frmreg = new frmRegister();
                if (frmreg.RegisterJH() == DialogResult.Yes)
                {
                    InitB2B();

                    frmLogin frm = new frmLogin();
                    if (frm.GoLogin() == DialogResult.Yes)
                    {
                        b2bclient.Program.oper_id = oper.oper_id;
                        b2bclient.Program.pwd     = oper.oper_pw;
                        b2bclient.Program.op_type = oper.oper_type;
                        Application.Run(new frmMain());
                    }
                }
            }
            catch (Exception e)
            {
                string str         = "";
                string strDateInfo = "出现应用程序未处理的异常:" + DateTime.Now + "\r\n";

                if (e != null)
                {
                    str = string.Format(strDateInfo + "异常类型:{0}\r\n异常消息:{1}\r\n异常信息:{2}\r\n",
                                        e.GetType().Name, e.Message, e.StackTrace);
                }
                else
                {
                    str = string.Format("应用程序线程错误:{0}", e);
                }
                LogHelper.writeLog("Main", str);

                MessageBox.Show("系统错误!Message:" + e.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }

            System.Environment.Exit(0);
        }
예제 #9
0
        private void metroTileItem_SignUP_Click(object sender, EventArgs e)
        {
            frmRegister reg = new frmRegister();

            reg.Show();
        }
예제 #10
0
        private void lblRegister_Click(object sender, EventArgs e)
        {
            frmRegister reg = new frmRegister();

            reg.Show(this);
        }
예제 #11
0
        private void GridAllArrivedListWaitingtoRegister_DoubleClick(object sender, EventArgs e)
        {
            if (!Program.IsDummy)
            {
                timer1.Stop();
                try
                {
                    if (GridAllArrivedListWaitingtoRegister.CurrentRow == null)
                    {
                        return;
                    }
                    //int rowid = Convert.ToInt32(GridAllArrivedListWaitingtoRegister.CurrentRow.Cells[0].Value.ToString());////Commented.Akkaradech on 2013-12-25
                    int rowid = Convert.ToInt32(GridAllArrivedListWaitingtoRegister.CurrentRow.Cells["Column13"].Value.ToString());////Updated.Akkaradech on 2013-12-25

                    var currentGetArride = (from t1 in dbc.tmp_getptarriveds where t1.row_id == rowid select t1).FirstOrDefault();


                    var currentGetAppoint = (from t1 in dbc.tmp_getptappointments where t1.appt_rowid == currentGetArride.appt_rowid select t1).FirstOrDefault();


                    if (currentGetArride != null)
                    {
conflict:
                        if (currentGetArride.flag_success == null || currentGetArride.flag_success == 'N')
                        {
                            currentGetArride.flag_success = 'Y';

                            try
                            {
                                dbc.SubmitChanges();
                            }
                            catch (System.Data.Linq.ChangeConflictException)
                            {
                                goto conflict;
                            }

                            Program.Tmp_GetPtarrived = currentGetArride;
                            if (currentGetAppoint != null)
                            {
                                Program.Tmp_GetAppointment = currentGetAppoint;
                            }
                            frmRegister frm = new frmRegister();
                            try
                            {
                                frm.patient_type = returnPatientType(GridAllArrivedListWaitingtoRegister.CurrentRow.Cells["Column12"].Value.ToString());
                            }
                            catch
                            {
                                frm.patient_type = "5";
                            }
                            frm.IsAddnew = true;
                            var iscompleted = frm.ShowDialog();
                            if (frm.Iscompleted != true)
                            {
                                currentGetArride.flag_success = 'N';
                                dbc.SubmitChanges();
                            }

                            timer1.Stop();
                            lbAlertMsg.Text = "";
                            this.LoadDataAll();
                            //uiFooter1.LoadData();
                            timer1.Start();
                        }
                        else
                        {
                            var strfullname = Program.Tmp_GetPtarrived.ttl_desc + Program.Tmp_GetPtarrived.papmi_name + " " + Program.Tmp_GetPtarrived.papmi_name2;
                            lbAlertMsg.Text = string.Format("ผู้รับบริการ {0} ถูกลงทะเบียนเรียบร้อยแล้ว", strfullname);
                        }
                    }
                }
                catch (Exception ex)
                {
                    Program.MessageError(this.Name, "GridAllArrivedListWaitingtoRegister_DoubleClick", ex, false);
                }
            }
        }
        private void InitContextMenues()
        {
            var MenuOidNodes = new ContextMenu();

            MenuOidNodes.MenuItems.Add("New", (_, __) =>
            {
                if (Project == null)
                {
                    return;
                }
                using (var f = new FrmNodes(Project.nodeSetups.ToArray()))
                {
                    if (f.ShowDialog() == DialogResult.OK)
                    {
                        Project.nodeSetups.Add(new NodeSetup(f.Result));
                        RefreshNodes();
                    }
                }
            });
            MenuOidNodes.MenuItems.Add("Edit", (_, __) =>
            {
                if (Project == null)
                {
                    return;
                }
                if (lbOidCodes.SelectedItem != null)
                {
                    using (var f = new FrmNodes(Project.nodeSetups.ToArray(), Project.nodeSetups[lbOidCodes.SelectedIndex]))
                    {
                        if (f.ShowDialog() == DialogResult.OK)
                        {
                            Project.nodeSetups[lbOidCodes.SelectedIndex] = (f.Result);
                            RefreshNodes();
                        }
                    }
                }
            });
            MenuOidNodes.MenuItems.Add("Delete", (_, __) =>
            {
                if (Project == null)
                {
                    return;
                }
                if (lbOidCodes.SelectedItem != null)
                {
                    List <SceneOid> sceneOids = new List <SceneOid>();;
                    if (Project.Scenes != null && Project.Scenes.Count > 0)
                    {
                        foreach (var scene in Project.Scenes)
                        {
                            sceneOids.AddRange(scene.SceneOids.Where(x => x.SetupName == lbOidCodes.SelectedItem.ToString()).ToList());
                        }
                    }

                    string existingSceneOids = sceneOids != null && sceneOids.Count > 0 ? ", Some scenes contains this OID polygons" : "";
                    if (MessageBox.Show(this, $"Delete {lbOidCodes.SelectedItem}{existingSceneOids}", "Delete Oid", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        Project.nodeSetups.RemoveAt(lbOidCodes.SelectedIndex);
                        if (Project.Scenes != null && Project.Scenes.Count > 0)
                        {
                            foreach (var scene in Project.Scenes)
                            {
                                scene.SceneOids.RemoveAll(x => x.SetupName == lbOidCodes.SelectedItem.ToString());
                            }
                        }
                        RefreshNodes();
                    }
                }
            });


            var MenuOidRegister = new ContextMenu();

            MenuOidRegister.MenuItems.Add("New", (_, __) =>
            {
                if (Project == null)
                {
                    return;
                }
                using (var f = new frmRegister(Project.oIDRegisters.ToArray(), null))
                {
                    if (f.ShowDialog() == DialogResult.OK)
                    {
                        Project.oIDRegisters.Add(f.Result);
                        RefreshOid();
                    }
                }
            });
            MenuOidRegister.MenuItems.Add("Edit", (_, __) =>
            {
                if (Project == null)
                {
                    return;
                }
                if (lbRegister.SelectedItem != null)
                {
                    using (var f = new frmRegister(Project.oIDRegisters.ToArray(), Project.oIDRegisters[lbRegister.SelectedIndex]))
                    {
                        if (f.ShowDialog() == DialogResult.OK)
                        {
                            RenameRegister(Project.oIDRegisters[lbRegister.SelectedIndex], f.Result);
                            Project.oIDRegisters[lbRegister.SelectedIndex] = (f.Result);

                            RefreshOid();
                            if (selectedOidNode != null)
                            {
                                LoadSetup(selectedOidNode);
                            }
                        }
                    }
                }
            });
            MenuOidRegister.MenuItems.Add("Delete", (_, __) =>
            {
                if (Project == null)
                {
                    return;
                }
                if (lbRegister.SelectedItem != null)
                {
                    if (MessageBox.Show(this, $"Delete {lbRegister.SelectedItem}", "Delete Register", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        DeleteRegister(Project.oIDRegisters[lbRegister.SelectedIndex]);

                        Project.oIDRegisters.Remove(Project.oIDRegisters[lbRegister.SelectedIndex]);
                        RefreshOid();
                        if (selectedOidNode != null)
                        {
                            LoadSetup(selectedOidNode);
                        }
                    }
                }
            });

            lbOidCodes.ContextMenu = MenuOidNodes;
            lbRegister.ContextMenu = MenuOidRegister;
        }
예제 #13
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            frmRegister registro = new frmRegister();

            registro.ShowDialog();
        }
예제 #14
0
        private void label1_Click(object sender, EventArgs e)
        {
            frmRegister frm = new frmRegister();

            frm.ShowDialog();
        }
예제 #15
0
        private void tsmIDangKi_Click(object sender, EventArgs e)
        {
            frmRegister register = new frmRegister();

            register.ShowDialog();
        }
예제 #16
0
        private void btnReg_Click(object sender, EventArgs e)
        {
            frmRegister frm = new frmRegister();

            frm.Show(this);
        }