예제 #1
0
파일: frmStaff.cs 프로젝트: kimykunjun/test
        private void sbtnContactNew_Click(object sender, System.EventArgs e)
        {
            ACMS.ACMSStaff.Contacts.frmContacts form = new ACMS.ACMSStaff.Contacts.frmContacts(employee.Id, -1, terminalUser.Branch.Id,true);

            if (DialogResult.OK == form.ShowDialog())
            {
                ListContact();
                ListAppointment();
            }

            form.Dispose();
        }
예제 #2
0
파일: frmStaff.cs 프로젝트: kimykunjun/test
 private void sbtnContactNew_Click(object sender, System.EventArgs e)
 {
     ACMS.ACMSStaff.Contacts.frmContacts form = new ACMS.ACMSStaff.Contacts.frmContacts(employee.Id, -1);
     if (DialogResult.OK == form.ShowDialog())
         ListContact();
     form.Dispose();
 }
예제 #3
0
파일: frmStaff.cs 프로젝트: kimykunjun/test
        //DEREK DNC Updates 2014-03-18
        private void sbtnContactEdit_Click(object sender, System.EventArgs e)
        {
            if (!ValidateRowSelectedContacts())
            {
                return;
            }

            DataRow row = gvContact.GetDataRow(gvContact.FocusedRowHandle);
            if (row["nStatus"].ToString() == "3")
            {
                UI.ShowMessage("Do Not Contact List cannot be edited.");
                return;
            }
            bool bDisableDNC = true;
            if (row["dtDNCExpiryDate"].ToString() != "")
                bDisableDNC = false;
            ACMS.ACMSStaff.Contacts.frmContacts form = new ACMS.ACMSStaff.Contacts.frmContacts(Convert.ToInt32(row["nEmployeeId"]),
                                                                                                Convert.ToInt32(row["nContactId"]),
                                                                                                terminalUser.Branch.Id, bDisableDNC);
            form.ContactPerson = row["strContactName"].ToString().Trim();
            form.MobileNo = row["strMobileNo"].ToString().Trim();
            form.Remarks = row["strRemarks"].ToString().Trim();
            form.Email = row["Email"].ToString().Trim();
            form.BranchCode = row["strBranchCode"].ToString();

            if (Convert.ToInt32(row["nStatus"]) == 0)
            {
                form.NStatusInActive = Convert.ToInt32(row["nStatus"]);
            }
            else
            {
                form.NStatusActive = Convert.ToInt32(row["nStatus"]);
            }

            if (row["Sex"].ToString() == "F")
            {
                form.IsGenderFemale = true;
            }
            else
            {
                form.IsGenderMale = true;
            }

            if (row["fPhoneCall"].ToString() == "True")
            {
                form.IsPhoneCall = true;
            }
            else
            {
                form.IsPhoneCall = false;
            }

            if (row["fSMS"].ToString() == "True")
            {
                form.IsSMS = true;
            }
            else
            {
                form.IsSMS = false;
            }

            if (row["fEmail"].ToString() == "True")
            {
                form.IsEmail = true;
            }
            else
            {
                form.IsEmail = false;
            }

            if (row["fDNC"].ToString() == "True")
            {
                form.IsDNCYes = true;
            }
            else if (row["fDNC"].ToString() == "False")
            {
                form.IsDNCNo = true;
            }

            if (row["dtDOB"].ToString() == "")
            {
                //form.DateOfBirth = DateTime.Now.Date;
            }
            else
            {
                form.DateOfBirth = Convert.ToDateTime(row["dtDOB"].ToString());
            }

            form.Nric = row["strNRICFIN"].ToString();
            form.MediaSourceCategory = row["strCategory"].ToString();
            form.MediaSourceID = Convert.ToInt32(row["nMediaSourceID"]);
            if (DialogResult.OK == form.ShowDialog())
            {
                ListContact();
                ListAppointment();
            }

            form.Dispose();
        }
예제 #4
0
파일: frmStaff.cs 프로젝트: kimykunjun/test
        private void sbtnContactEdit_Click(object sender, System.EventArgs e)
        {
            if (!ValidateRowSelectedContacts())
                return;

            DataRow row = gvContact.GetDataRow(gvContact.FocusedRowHandle);
            ACMS.ACMSStaff.Contacts.frmContacts form = new ACMS.ACMSStaff.Contacts.frmContacts(employee.Id,
                Convert.ToInt32(row["nContactId"]));
            form.ContactPerson = row["strContactName"].ToString();
            form.Organization = row["strOrganization"].ToString();
            form.OfficeNo = row["strOfficeNo"].ToString();
            form.MobileNo = row["strMobileNo"].ToString();
            form.Fax = row["strFax"].ToString();
            form.Email = row["strEmail"].ToString();
            form.Address = row["strAddress"].ToString();
            if (DialogResult.OK == form.ShowDialog())
                ListContact();
            form.Dispose();
        }