Beispiel #1
0
        //[HttpPost]
        //public ActionResult Import()
        //{
        //    return View();
        //}

        public bool Edit(string contactid, string unid, string designation, string title, string firstname, string lastname, string emailaddress, string mobilephone, string secondaryemail, string phone, string companyname, string type, string objecttype, string contactgroup)
        {
            bool   status       = new bool();
            string comcompanyid = Session["companyid"].ToString();

            Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();

            UI.Models.PortalContact editedcontact = new Models.PortalContact();
            editedcontact.Companyname  = companyname;
            editedcontact.firstname    = firstname;
            editedcontact.lastname     = lastname;
            editedcontact.emailaddress = emailaddress;
            editedcontact.officephone  = phone;
            editedcontact.mobilephone  = mobilephone;

            status = appclient.UpdateContact(contactid,
                                             comcompanyid,
                                             comcompanyid,
                                             unid,
                                             designation,
                                             title,
                                             firstname,
                                             lastname,
                                             emailaddress,
                                             mobilephone,
                                             secondaryemail,
                                             phone, Newtonsoft.Json.JsonConvert.SerializeObject(editedcontact), type, objecttype, contactgroup, comcompanyid);

            return(status);
        }
        //[HttpPost]
        //public ActionResult Import()
        //{
        //    return View();
        //}
        public bool Edit(string contactid,string unid,string designation,string title,string firstname,string lastname,string emailaddress,string mobilephone,string secondaryemail,string phone,string companyname,string type,string objecttype,string contactgroup)
        {
            bool status = new bool();
            string comcompanyid = Session["companyid"].ToString();
            Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();

            UI.Models.PortalContact editedcontact = new Models.PortalContact();
            editedcontact.Companyname = companyname;
            editedcontact.firstname = firstname;
            editedcontact.lastname = lastname;
            editedcontact.emailaddress = emailaddress;
            editedcontact.officephone = phone;
            editedcontact.mobilephone = mobilephone;

            status=appclient.UpdateContact(contactid,
                                    comcompanyid,
                                    comcompanyid,
                                    unid,
                                    designation,
                                    title,
                                    firstname,
                                    lastname,
                                    emailaddress,
                                    mobilephone,
                                    secondaryemail,
                                    phone, Newtonsoft.Json.JsonConvert.SerializeObject(editedcontact), type, objecttype, contactgroup, comcompanyid);

            return status;
        }
Beispiel #3
0
        public ActionResult Manage(string listid)
        {
            Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();
            Business.ApplicationService.contact[]        contacts  = appclient.GetContacts("9a73072573754e13a02381c9d931e5c4", "9a73072573754e13a02381c9d931e5c4", "1", "100");

            List <UI.Models.PortalContact> portalcontacts = new List <Models.PortalContact>();

            foreach (Business.ApplicationService.contact contact in contacts)
            {
                UI.Models.PortalContact tempcontact = new Models.PortalContact();

                tempcontact.id           = contact.contactid;
                tempcontact.emailaddress = contact.emailid;

                portalcontacts.Add(tempcontact);
            }
            return(View(portalcontacts));
        }
Beispiel #4
0
        public ActionResult Index()
        {
            Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();
            Business.ApplicationService.contact[]        contacts  = appclient.GetContacts(Session["companyid"].ToString(), Session["companyid"].ToString(), "1", "100");

            List <UI.Models.PortalContact> portalcontacts = new List <Models.PortalContact>();

            foreach (Business.ApplicationService.contact contact in contacts)
            {
                UI.Models.PortalContact singlecontact = new Models.PortalContact();
                try
                {
                    UI.Models.PortalContact ObjContact = Newtonsoft.Json.JsonConvert.DeserializeObject <UI.Models.PortalContact>(contact.data);
                    if (ObjContact == null)
                    {
                        singlecontact.Companyname = "";
                        singlecontact.middlename  = "";
                    }
                    else
                    {
                        singlecontact.Companyname = ObjContact.Companyname;
                        singlecontact.middlename  = ObjContact.middlename;
                    }
                }
                catch
                {
                    singlecontact.Companyname = "";
                    singlecontact.middlename  = "";
                }
                singlecontact.id           = contact.contactid;
                singlecontact.firstname    = contact.firstname;
                singlecontact.lastname     = contact.lastname;
                singlecontact.emailaddress = contact.emailid;
                singlecontact.mobilephone  = contact.mobile;
                singlecontact.officephone  = contact.phone;
                singlecontact.objecttype   = contact.objecttype;
                singlecontact.designation  = contact.designation;

                portalcontacts.Add(singlecontact);
            }
            return(View(portalcontacts));
        }
        public ActionResult Index()
        {
            Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();
            Business.ApplicationService.contact[] contacts = appclient.GetContacts(Session["companyid"].ToString(), Session["companyid"].ToString(),"1","100");

            List<UI.Models.PortalContact> portalcontacts = new List<Models.PortalContact>();
            foreach (Business.ApplicationService.contact contact in contacts)
            {
                UI.Models.PortalContact singlecontact = new Models.PortalContact();
                try
                {
                    UI.Models.PortalContact ObjContact = Newtonsoft.Json.JsonConvert.DeserializeObject<UI.Models.PortalContact>(contact.data);
                    if (ObjContact == null)
                    {
                        singlecontact.Companyname = "";
                        singlecontact.middlename = "";
                    }
                    else
                    {
                        singlecontact.Companyname = ObjContact.Companyname;
                        singlecontact.middlename = ObjContact.middlename;
                    }

                }
                catch
                {
                    singlecontact.Companyname = "";
                    singlecontact.middlename = "";

                }
                singlecontact.id = contact.contactid;
                singlecontact.firstname = contact.firstname;
                singlecontact.lastname = contact.lastname;
                singlecontact.emailaddress = contact.emailid;
                singlecontact.mobilephone = contact.mobile;
                singlecontact.officephone = contact.phone;
                singlecontact.objecttype = contact.objecttype;
                singlecontact.designation = contact.designation;

                portalcontacts.Add(singlecontact);
            }
            return View(portalcontacts);
        }
        public ActionResult Manage(string listid)
        {
            Business.ApplicationService.AppServiceClient appclient = new Business.ApplicationService.AppServiceClient();
            Business.ApplicationService.contact[] contacts = appclient.GetContacts("9a73072573754e13a02381c9d931e5c4", "9a73072573754e13a02381c9d931e5c4","1","100");

            List<UI.Models.PortalContact> portalcontacts = new List<Models.PortalContact>();
            foreach (Business.ApplicationService.contact contact in contacts)
            {
                UI.Models.PortalContact tempcontact = new Models.PortalContact();

                tempcontact.id = contact.contactid;
                tempcontact.emailaddress = contact.emailid;

                portalcontacts.Add(tempcontact);
            }
            return View(portalcontacts);
        }