public static string[] add(string nameAdd, string RepresentateAdd, string cellAdd, string AdressAdd, string AdressAdd2, string CountryComboAdd, string StateComboAdd, string cityComboAdd, string sectorComboAdd, string phoneAdd, string faxAdd, string emailAdd, string distributor, string category, string userAdd, string passwordAdd, string PinAdd, string nameUserAdd, string apellidoAdd)
        {
            if (string.IsNullOrEmpty(nameAdd)) { nameAdd = null; } if (RepresentateAdd == "") { RepresentateAdd = null; }
            if (string.IsNullOrEmpty(cellAdd)) { cellAdd = null; }
            if (string.IsNullOrEmpty(AdressAdd)) { AdressAdd = null; }
            if (string.IsNullOrEmpty(AdressAdd2)) { AdressAdd2 = null; }
            if (string.IsNullOrEmpty(CountryComboAdd)) { CountryComboAdd = null; }
            if (string.IsNullOrEmpty(StateComboAdd)) { StateComboAdd = null; }
            if (string.IsNullOrEmpty(cityComboAdd)) { cityComboAdd = null; }
            if (sectorComboAdd == "") { sectorComboAdd = null; }
            if (phoneAdd == "") { phoneAdd = null; }
            if (faxAdd == "") { faxAdd = null; }
            if (emailAdd == "") { emailAdd = null; }
            if (distributor == "") { distributor = null; }
            if (category == "") { category = null; }

            UTDWSClient.Interfaces.RspLogin r = new UTDWSClient.Interfaces.RspLogin();
            r = (UTDWSClient.Interfaces.RspLogin)System.Web.HttpContext.Current.Session["Login"];
            UTDWSClient.Interfaces.RspDistributorParam parameters = new UTDWSClient.Interfaces.RspDistributorParam()
            {

                DISTRIBUTOR = nameAdd,
                REPRESENTATIVE = RepresentateAdd,
                ADDRESS = (AdressAdd),
                ADDRESS2 = (AdressAdd2),
                COUNTRY_ID = Int32.Parse(CountryComboAdd),
                CITY_ID = Int32.Parse(cityComboAdd),
                STATE_ID = Int32.Parse(StateComboAdd),
                SECTOR_ID = Int32.Parse(sectorComboAdd),
                ENTITY_CATEGORY_ID = Int32.Parse(category),
                ENTITY_TYPE_ID = Int32.Parse(distributor),
                FAX = faxAdd,
                EMAIL = (emailAdd),
                PHONE = (phoneAdd),
                CELL = cellAdd,
                CREATION_DATE = DateTime.Now

            };
            UTDWSClient.Interfaces.rspDistributorResultNew result = UTDWSClient.WSClient.DistribuitorNew(r.SESSION, parameters);
            string[] array = { Convert.ToString(result.RSP_CODE), Convert.ToString(result.RSP_MESSAGE) };
            return array;
        }
        public static string[] edit(string ID, string nameAdd, string RepresentateAdd, string cellAdd, string AdressAdd, string AdressAdd2, string CountryComboAdd, string StateComboAdd, string cityComboAdd, string sectorComboAdd, string phoneAdd, string faxAdd, string emailAdd, string distributor, string category)
        {
            if (ID == "") { ID = "0"; }
            if (CountryComboAdd == "") { CountryComboAdd = "0"; }
            if (StateComboAdd == "") { StateComboAdd = "0"; }
            if (cityComboAdd == "") { cityComboAdd = "0"; }
            if (sectorComboAdd == "") { sectorComboAdd = "0"; }
            if (category == "") { category = "0"; }
            if (distributor == "") { distributor = "0"; }
            UTDWSClient.Interfaces.RspLogin r = new UTDWSClient.Interfaces.RspLogin();
            r = (UTDWSClient.Interfaces.RspLogin)System.Web.HttpContext.Current.Session["Login"];
            UTDWSClient.Interfaces.RspDistributorParam parameters = new UTDWSClient.Interfaces.RspDistributorParam()
            {

                DISTRIBUTOR = nameAdd,
                REPRESENTATIVE = RepresentateAdd,
                ADDRESS = (AdressAdd),
                ADDRESS2 = (AdressAdd2),
                COUNTRY_ID = Int32.Parse(CountryComboAdd),
                CITY_ID = Int32.Parse(cityComboAdd),
                STATE_ID = Int32.Parse(StateComboAdd),
                SECTOR_ID = Int32.Parse(sectorComboAdd),
                ENTITY_CATEGORY_ID = Int32.Parse(category),
                ENTITY_TYPE_ID = Int32.Parse(distributor),
                FAX = faxAdd,
                EMAIL = (emailAdd),
                PHONE = (phoneAdd),
                CELL = cellAdd,
                MODIFIED_DATE = DateTime.Now,

                DISTRIBUTOR_ID = Int32.Parse(ID)

            };
            UTDWSClient.Interfaces.RspDistribuitorEdit result = UTDWSClient.WSClient.DistribuitorEdit(r.SESSION, parameters);
            string[] array = { Convert.ToString(result.RSP_CODE), Convert.ToString(result.RSP_MESSAGE) };
            return array;
        }