Example #1
0
 public bool UpdatePassword(string Username, string Password)
 {
     try
     {
         var _user = _db.SingleOrDefault <DolUser>("where UserName =@0", Username);
         _user.Password = Password;
         _db.Update(_user);
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Example #2
0
 //update terminal
 public bool ModifyTerminal(TerminalRequest param)
 {
     try
     {
         var terminal = _db.SingleOrDefault <DolTerminal>("where TerminalId=@0", param.TerminalId);
         terminal.Terminalno       = param.TerminalNo;
         terminal.Terminalref      = param.TerminalRef;
         terminal.Brandid          = param.BrandId;
         terminal.Clientid         = param.ClientId;
         terminal.Engineer         = param.Engineer;
         terminal.Isterminalactive = param.IsTerminalActive;
         terminal.Isundersupport   = param.IsUnderSupport;
         terminal.Location         = param.Location;
         terminal.Serialno         = param.SerialNo;
         terminal.Stateid          = param.StateId;
         terminal.Terminalalias    = param.TerminalAlias;
         terminal.Createdby        = param.CreatedBy;
         terminal.Createdon        = param.CreatedOn;
         _db.Update(terminal);
         return(true);
     }
     catch (Exception ex)
     {
         Log.ErrorFormat("ModifyTerminal", ex.Message);
         return(false);
     }
 }
Example #3
0
 public bool UpdateRole(string Title, string Desc, bool Status, int?Id)
 {
     try
     {
         var _role = _db.SingleOrDefault <UserRole>("where RoleId =@0", Id);
         _role.Title        = Title;
         _role.Desc         = Desc;
         _role.Isroleactive = Status;
         _db.Update(_role);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool UpdateRole(string Title, string Desc, bool Status, int?Id)
 {
     try
     {
         var _role = _db.SingleOrDefault <UserRole>("where RoleId =@0", Id);
         _role.Rolename     = Title;
         _role.Roledesc     = Desc;
         _role.Isroleactive = Status;
         _db.Update(_role);
         return(true);
     }
     catch (Exception ex)
     {
         Log.ErrorFormat("UpdateRole", ex.Message);
         return(false);
     }
 }
Example #5
0
 public bool LogOffUser(LoginRequest request)
 {
     try
     {
         var param = _db.SingleOrDefault <UserTracking>("where UserName=@0 and SystemIp=@1 and IsUserLogOut=@2 and IsUserLogOff=@2", request.UserName, request.SystemIp, false);
         param.Isuserlogoff = true;
         _db.Update(param);
         return(true);
     }
     catch (Exception ex)
     {
         log.ErrorFormat("UserLogOff", ex);
         return(false);
     }
 }
Example #6
0
 public bool UpdateClient(string ClientName, string ClientAlias, HttpPostedFileBase ClientBanner, int RespTime, int RestTime, bool IsClientActive, string ExtClientBanner, int ClientId)
 {
     try
     {
         var client = _db.SingleOrDefault <DolClient>("WHERE ClientId=@0", ClientId);
         client.Clientname     = ClientName;
         client.Clientalias    = ClientAlias;
         client.Isclientactive = IsClientActive;
         client.Clientbanner   = DoFileUpload(ClientBanner, ExtClientBanner);
         client.Resptime       = RespTime;
         client.Resttime       = RestTime;
         _db.Update(client);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Example #7
0
 public bool UpdateBrandDetails(string BrandName, string BrandDesc, bool IsBrandActive, string CreatedBy, int BrandId)
 {
     try
     {
         var brand = _db.SingleOrDefault <DolBrand>("WHERE BrandId=@0", BrandId);
         brand.Brandname     = BrandName;
         brand.Branddesc     = BrandDesc;
         brand.Isbrandactive = IsBrandActive;
         brand.Createdby     = CreatedBy;
         brand.Createdon     = DateTime.Now;
         brand.Createdby     = CreatedBy;
         _db.Update(brand);
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool CloseIncident(CloseRequest request)
 {
     try
     {
         var param = _db.FirstOrDefault <DolIncident>("where IncidentId=@0", request.IncidentId);
         param.Resolvedby     = request.ResolvedBy;
         param.Resolvedon     = request.ResolvedOn;
         param.Ispartreplaced = request.IsParReplaced;
         param.Pegrade        = ""; //Generate Performance grade based on SLA
         param.Iscallresolved = request.IsCallResolved;
         param.Closedremark   = request.ClosedRemark;
         _db.Update(param);
         return(true);
     }
     catch (Exception ex)
     {
         log.Fatal("ClassName:IncidentManagement MethodName: CloseIncident", ex);
         return(false);
     }
 }
Example #9
0
 public bool UpdateClient(ClientRequest request)
 {
     try
     {
         var client = _db.SingleOrDefault <DolClient>("WHERE ClientId=@0", request.ClientId);
         client.Clientname     = request.ClientName;
         client.Clientalias    = request.ClientAlias;
         client.Isclientactive = request.IsClientActive;
         client.Clientbanner   = request.ClientBanner;
         client.Resptimein     = request.RespTimeIn;
         client.Resttimein     = request.RestTimeIn;
         client.Resptimeout    = request.RespTimeOut;
         client.Resttimeout    = request.RestTimeOut;
         _db.Update(client);
         return(true);
     }
     catch (Exception ex)
     {
         Log.ErrorFormat("UpdateClient", ex);
         return(false);
     }
 }