Ejemplo n.º 1
0
        public JsonResult addDistributor(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)
        {
            string[] result = {"",""};

            try{
                result = DistributorMethods.add(nameAdd, RepresentateAdd, cellAdd, AdressAdd, AdressAdd2, CountryComboAdd, StateComboAdd, cityComboAdd, sectorComboAdd, phoneAdd, faxAdd, emailAdd, distributor, category, userAdd, passwordAdd, PinAdd, nameUserAdd, apellidoAdd);
                modalResult results = new modalResult() { Rcode = result[0], Rmessague = result[1] };
                return Json(results);
            }
            catch (Exception e)
            {
                result[0] = e.Message; result[1] = e.Source;
                modalResult results = new modalResult() { Rcode = result[0], Rmessague = result[1] };
                return Json(results);
            }
        }
Ejemplo n.º 2
0
 public JsonResult editDistributor(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)
 {
     string[] result = { "", "" };
     try
     {
         result = DistributorMethods.edit(ID, nameAdd, RepresentateAdd, cellAdd, AdressAdd, AdressAdd2, CountryComboAdd, StateComboAdd, cityComboAdd, sectorComboAdd, phoneAdd, faxAdd, emailAdd, distributor, category);
         modalResult results = new modalResult() { Rcode = result[0], Rmessague = result[1] };
         DistributorMethods.getReports();
         return Json(results);
     }
     catch(Exception e)
     {
         result[0] = e.Message; result[1] = e.Source;
         modalResult results = new modalResult() { Rcode = result[0], Rmessague = result[1] };
         return Json(results);
     }
 }