Exemple #1
0
 public bool InsertClient(string ClientName, string ClientAlias, string ClientBanner, int RespTime, int RestTime, bool IsClientActive, string CreatedBy)
 {
     try
     {
         var client = new DolClient();
         client.Clientname     = ClientName;
         client.Clientalias    = ClientAlias;
         client.Resptime       = RespTime;
         client.Resttime       = RestTime;
         client.Isclientactive = IsClientActive;
         client.Createdon      = DateTime.Now;
         client.Createdby      = CreatedBy;
         _db.Insert(client);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Exemple #2
0
 public bool InsertClient(ClientRequest request)
 {
     try
     {
         var param = new DolClient();
         param.Clientalias    = request.ClientAlias;
         param.Clientbanner   = request.ClientBanner;
         param.Clientname     = request.ClientName;
         param.Createdby      = request.CreatedBy;
         param.Createdon      = request.CreatedOn;
         param.Isclientactive = request.IsClientActive;
         param.Resptimein     = request.RespTimeIn;
         param.Resptimeout    = request.RespTimeOut;
         param.Resttimein     = request.RestTimeIn;
         param.Resttimeout    = request.RestTimeOut;
         _db.Insert(request);
         return(true);
     }
     catch (Exception ex)
     {
         Log.ErrorFormat("InsertClient", ex.Message);
         return(false);
     }
 }