Ejemplo n.º 1
0
 public ContactEventArgs(CTContactDetails obj)
 {
     Contact = obj;
 }
Ejemplo n.º 2
0
        public void UpdateSelectedRow(CTContactDetails pContactDetail = null)
        {
            if (gvCampaignList.RowCount < 1)
                return;

            if (pContactDetail == null) {
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Firstname", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Middlename", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Lastname", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Title", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Direct_Phone", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Mobile", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Email", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Address_1", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Address_2", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_City", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Zipcode", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Country", null);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "contact_id", 0);
            }
            else {
                if (ValidationUtility.TryParseInt(gvCampaignList.GetRowCellValue(gvCampaignList.FocusedRowHandle, "contact_id").ToString()) != pContactDetail.id)
                    return;

                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Firstname", pContactDetail.first_name);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Middlename", pContactDetail.middle_name);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Lastname", pContactDetail.last_name);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Title", pContactDetail.title);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Direct_Phone", pContactDetail.direct_phone);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Mobile", pContactDetail.mobile);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Email", pContactDetail.email);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Address_1", pContactDetail.address_1);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Address_2", pContactDetail.address_2);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_City", pContactDetail.city);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Zipcode", pContactDetail.zipcode);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Country", pContactDetail.country);
                gvCampaignList.SetRowCellValue(gvCampaignList.FocusedRowHandle, "Contact_Modified", DateTime.Now.ToString("yyyy-MM-dd") + " by " + UserSession.CurrentUser.UserFullName);
            }
        }
Ejemplo n.º 3
0
        public void UpdateContact(CTContactDetails pContactPerson)
        {
            if ((pContactPerson.absence_start != null && pContactPerson.absence_end != null) &&
                (pContactPerson.absence_start <= DateTime.Now && pContactPerson.absence_end >= DateTime.Now))
                pContactPerson.is_absent = true;
            else
                pContactPerson.is_absent = false;

            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "first_name", pContactPerson.first_name);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "last_name", pContactPerson.last_name);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "title", pContactPerson.title);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "direct_phone", pContactPerson.direct_phone);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "mobile", pContactPerson.mobile);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "email", pContactPerson.email);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "has_contact_remarks", pContactPerson.has_contact_remarks);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "complete_address", pContactPerson.complete_address);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "role_tags", pContactPerson.role_tags);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "is_absent", pContactPerson.is_absent);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "country", pContactPerson.country);
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "linkedin_url", pContactPerson.linkedin_url);

            string address = "";
            if (ValidationUtility.IFNullString(pContactPerson.address_1,"") != "") address = pContactPerson.address_1;
            else if (ValidationUtility.IFNullString(pContactPerson.address_2, "") != "") address = pContactPerson.address_2;

            if (ValidationUtility.IFNullString(pContactPerson.city, "") != "") address += ", " + pContactPerson.city;
            if (ValidationUtility.IFNullString(pContactPerson.zipcode, "") != "") address += ", " + pContactPerson.zipcode;
            if (ValidationUtility.IFNullString(pContactPerson.country, "") != "") address += ", " + pContactPerson.country;

            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "complete_address", address);

            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "contact_name", string.Format("{0} {1}", pContactPerson.first_name, pContactPerson.last_name));
            gvContact.SetRowCellValue(gvContact.FocusedRowHandle, "title_role", string.Format("{0} {1}",
                pContactPerson.title,
                string.IsNullOrEmpty(pContactPerson.role_tags) ? string.Empty : string.Format("({0})", pContactPerson.role_tags)
            ));
        }
Ejemplo n.º 4
0
 private void GetContactInformation()
 {
     m_ContactDetail = null;
     m_ContactDetail = vgridContact.GetRecordObject(0) as CTContactDetails;
     if (m_ContactDetail != null) {
         if (string.IsNullOrEmpty(m_ContactDetail.remarks))
             m_ContactDetail.has_contact_remarks = false;
         else
             m_ContactDetail.has_contact_remarks = true;
     }
 }