Exemple #1
0
        public static string WMSaveRequestHead(object objAdr, string State)
        {
            string                result         = "";
            CustomProfile         profile        = CustomProfile.GetProfile();
            iUCCommonFilterClient UCCommonFilter = new iUCCommonFilterClient();
            tAddress              Adrs           = new tAddress();
            tContactPersonDetail  Con            = new tContactPersonDetail();

            try
            {
                Dictionary <string, object> dictionary = new Dictionary <string, object>();
                dictionary = (Dictionary <string, object>)objAdr;

                Adrs.AddressLine1     = dictionary["AddressLine1"].ToString();
                Adrs.ID               = Convert.ToInt64(HttpContext.Current.Session["ConID"].ToString());
                Adrs.LastModifiedBy   = profile.Personal.UserID.ToString();
                Adrs.LastModifiedDate = DateTime.Now;
                Adrs.City             = "";
                UCCommonFilter.EditAddress(Adrs, profile.DBConnection._constr);

                Con.Name     = dictionary["Name"].ToString();
                Con.EmailID  = dictionary["EmilID"].ToString();
                Con.MobileNo = dictionary["MobileNo"].ToString();
                long AdrsID = Convert.ToInt64(HttpContext.Current.Session["ConID"].ToString());
                UCCommonFilter.EditLocation(Con, AdrsID, profile.DBConnection._constr);

                result = "Location saved successfully";
            }
            catch { result = "Some error occurred"; }
            finally { UCCommonFilter.Close(); }

            return(result);
        }