示例#1
0
 public string AddAddress(Cog.MLIAD.BusinessLogic.Associate.Address address, string AssociateID)
 {
     try
     {
         MLIADService.SetNoCache();
         return(repository.AddAddress(address, AssociateID));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#2
0
 public string AddFirewall(Cog.MLIAD.BusinessLogic.Associate.FirewallRequest firewall)
 {
     try
     {
         MLIADService.SetNoCache();
         return(repository.AddFirewall(firewall));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#3
0
 public string AddSoftware(Cog.MLIAD.BusinessLogic.Associate.SoftwareRequest software)
 {
     try
     {
         MLIADService.SetNoCache();
         return(repository.AddSoftware(software));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#4
0
 public string AddCategory(Cog.MLIAD.BusinessLogic.Associate.Category category)
 {
     try
     {
         MLIADService.SetNoCache();
         return(repository.AddCategory(category));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#5
0
 public BusinessLogic.Associate.Associate GetAssociatesByUserID(string UserID)
 {
     try
     {
         MLIADService.SetNoCache();
         return(repository.GetAssociatesByUserID(UserID));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#6
0
 public List <BusinessLogic.Associate.Associate> GetAssociatesPerGroupAndRole(string groupid, string roleid)
 {
     try
     {
         MLIADService.SetNoCache();
         return(repository.GetAssociatesPerGroupAndRole(Convert.ToInt32(groupid), Convert.ToInt32(roleid)));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#7
0
 public string BroadCastSMS(Cog.MLIAD.BusinessLogic.Associate.SMS newSMS)
 {
     try
     {
         MLIADService.SetNoCache();
         string retval = repository.SendSMS(newSMS);
         return(retval);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#8
0
 public string DeleteCategory(Cog.MLIAD.BusinessLogic.Associate.Category category)
 {
     try
     {
         MLIADService.SetNoCache();
         string retval = "failure";
         retval = repository.DeleteCategory(category.id);
         return(retval);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#9
0
        public int SaveMessage(string gid, string id, string message)
        {
            int retVal = 0;

            try
            {
                MLIADService.SetNoCache();
                int AssociateID = Convert.ToInt32(id);
                int GroupID     = Convert.ToInt32(gid);
                retVal = repository.SaveMessage(AssociateID, GroupID, message);
            }
            catch (Exception e)
            {
                throw e;
            }
            return(retVal);
        }
示例#10
0
 public string EditAssociate(Cog.MLIAD.BusinessLogic.Associate.Associate associate)
 {
     try
     {
         MLIADService.SetNoCache();
         string retval = "failure";
         if (associate.oper == "edit")
         {
             retval = repository.EditAssociate(associate);
         }
         else if (associate.oper == "delete")
         {
             retval = repository.DeleteAssociate(associate.id);
         }
         return(retval);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#11
0
 public string EditFirewall(Cog.MLIAD.BusinessLogic.Associate.FirewallRequest firewall)
 {
     try
     {
         MLIADService.SetNoCache();
         string retval = "failure";
         if (firewall.oper == "edit")
         {
             retval = repository.EditFirewall(firewall);
         }
         else if (firewall.oper == "delete")
         {
             retval = repository.DeleteFirewall(firewall.id);
         }
         return(retval);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
示例#12
0
        public Pager <Cog.MLIAD.BusinessLogic.Associate.Associate> SearchAssociate(Cog.MLIAD.BusinessLogic.Associate.Associate associate, string page, string row, string totalcount)
        {
            try
            {
                int?count     = 0;
                int pageIndex = Convert.ToInt32(page);
                int pageSize  = Convert.ToInt32(row);
                Pager <Cog.MLIAD.BusinessLogic.Associate.Associate> pager = new Pager <Cog.MLIAD.BusinessLogic.Associate.Associate>();
                MLIADService.SetNoCache();
                List <Cog.MLIAD.BusinessLogic.Associate.Associate> associates = repository.SearchAssociate(associate, (pageIndex - 1), pageSize, ref count);

                pager.Items     = associates;
                pager.Page      = pageIndex;
                pager.ItemCount = (count == null) ? 0 : Convert.ToInt32(count);
                pager.PageTotal = ((pager.ItemCount + pageSize - 1) / pageSize);
                pager.PageSize  = pageSize;
                return(pager);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }