Exemplo n.º 1
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            try
            {
                DoctorDetails frm = new DoctorDetails();
                frm.ShowDialog();

                if (isSubmited)
                {
                    Search();
                }

                isSubmited = false;
            }
            catch (Exception ex)
            {
                isSubmited = false;
                Utility.ErrorLog.Logging("Doctor List", ex.Message.ToString(), ex.StackTrace.ToString());
            }
        }
Exemplo n.º 2
0
        private void FillFormData(Guid?id)
        {
            try
            {
                DoctorDetailModel model = service.GetById(id.Value);
                if (model != null)
                {
                    DoctorDetails frm = new DoctorDetails(model.Id);
                    if (model.FullName.ToUpper() == "SIR" || model.FullName.ToUpper() == "MADAM")
                    {
                        frm.txtFullName.ReadOnly = true;
                    }
                    frm.txtFullName.Text      = model.FullName;
                    frm.txtAddress.Text       = model.Address;
                    frm.txtMobileNumber.Text  = model.MobileNumber;
                    frm.txtPhoneNumber.Text   = model.PhoneNumber;
                    frm.txtQualification.Text = model.Qualification;
                    frm.txtClinic.Text        = model.ClinicName;
                    frm.txtClinicContact.Text = model.ClinicContact;
                    frm.txtAge.Text           = Convert.ToString(model.Age);
                    frm.chkConsultant.Checked = model.IsCounsalting.HasValue ? model.IsCounsalting.Value : false;
                    frm.chkInHouse.Checked    = model.IsInHouse.HasValue ? model.IsInHouse.Value : false;
                    setGender(ref frm, model.Gender.Value);
                    frm.ShowDialog();
                    if (isSubmited)
                    {
                        Search();
                    }

                    isSubmited = false;
                }
            }
            catch (Exception ex)
            {
                isSubmited = false;
                Utility.ErrorLog.Logging("Doctor List", ex.Message.ToString(), ex.StackTrace.ToString());
            }
        }