// Use this for initialization void Start() { displayResult = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<socket>(); logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>(); logScript.file.Close(); }
private void setLog() { var item = new log(); item.log_Username = userInformation.user.usr_Username; item.log_DateTime = date.getCurrentDate(); item.log_Actions = "Cash Out Created by UserName= "******", Full Name: " + userInformation.user.usr_FirstName + " " + userInformation.user.usr_LastName + ", Cash= " + label_totalCash; serviceslog.CreateLog(item); }
private void setLog() { var items = new log(); items.log_Username = userInformation.user.usr_Username; items.log_DateTime = dateservice.getCurrentDate(); items.log_Actions = "Reset User: "******" " + userInformation.user.usr_LastName + ", Level of user: " + userInformation.user.usr_SecurityLevel; serviceslog.CreateLog(items); }
private void setLog(user userData) { var items = new log(); items.log_Username = txtbox_username.Text; items.log_DateTime = date.getCurrentDate(); items.log_Actions = "Login of: " + userData.usr_FirstName + " " + userData.usr_LastName + ", Level of user: " + userData.usr_SecurityLevel; serviceslog.CreateLog(items); }
private void setLog() { var item = new log(); item.log_Username = userInformation.user.usr_Username; item.log_DateTime = dateservice.getCurrentDate(); item.log_Actions = "The ( " + txtbox_firstname.Text + " " + txtbox_lastname.Text + " ) Information Was Modified by: " + userInformation.user.usr_FirstName + " " + userInformation.user.usr_LastName + ", Level of user: " + userInformation.user.usr_SecurityLevel; serviceslog.CreateLog(item); }
private void AddLog(log logInMemory) { using (var unitOfWork = _unitOfWorkFactory.Create()) { _logCommand.Insert(logInMemory); unitOfWork.Commit(); } }
private void setLog() { var items = new log(); items.log_Username = userInformation.user.usr_Username; items.log_DateTime = date.getCurrentDate(); items.log_Actions = "Search Information by UserName= "******", Full Name: " + userInformation.user.usr_FirstName + " " + userInformation.user.usr_LastName + " in Closed Statement, Search Data: Transaction Number= " + txtbox_ID.Text + ", Dates: From= " + fromdate.Text + ", To= " + todate.Text; serviceslog.CreateLog(items); }
private void Button_Click_14(object sender, RoutedEventArgs e) { var items = new log(); items.log_Username = userInformation.user.usr_Username; items.log_DateTime = date.getCurrentDate(); items.log_Actions = "Cash Out Cancel by UserName= "******", Full Name: " + userInformation.user.usr_FirstName + " " + userInformation.user.usr_LastName + ", Cash Captured= " + label_totalCash; serviceslog.CreateLog(items); }
public bool SaveToDB() { log data = MapData(); context.log.Add(data); int i = context.SaveChanges(); return(i > 0); }
// Use this for initialization void Start() { rend = GetComponent<Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>(); source = GetComponent<AudioSource>(); origin = transform.position; isSnapped = false; pcard = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PecCard>(); }
public HttpResponseMessage Post([FromBody] log us) { var res = db_layer.setLog(us); var response = new HttpResponseMessage(HttpStatusCode.Created) { Content = new StringContent(JsonConvert.SerializeObject(res), System.Text.Encoding.UTF8, "application/json") }; return(response); }
public LogActivityViewModel(log l) { this.Id = l.id; this.Timestamp = l.timestamp.ToString(); this.Application = l.application; this.Ip = l.ip; this.User = l.user; this.Action = l.action; this.Data = l.data; }
public LogPresentationStub(log dbItem) { Id = dbItem.id; Timestamp = dbItem.timestamp; Ip = dbItem.ip; User = dbItem.user; Action = dbItem.action; Data = System.Net.WebUtility.UrlDecode(dbItem.data); Application = dbItem.application; }
public LogPresentationStub(log dbItem) { this.Id = dbItem.id; this.Timestamp = dbItem.timestamp; this.Application = dbItem.application; this.Ip = dbItem.ip; this.User = dbItem.user; this.Action = dbItem.action; this.Data = dbItem.data; }
public bool Basarili(string kullanici, string password) { log resultUser = db.log.Where(x => x.Kuladi == kullanici && x.Sifre == password).FirstOrDefault(); if (resultUser != null) { return(true); } return(false); }
public ActionResult Create([Bind(Include = "id,Tc,Ad,Soyad,Kuladi,Sifre,Mail,Telefon,Aciltel,Cinsiyet,Doğum,Medeni,Kultip,Kulil,Kulilçe,Adres,İban,Başlama,Ayrılma,Okul,Bölüm,Resim")] log kullanici) { if (ModelState.IsValid) { db.log.Add(kullanici); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(kullanici)); }
public MainWindow() { InitializeComponent(); JDPal = new AutoPal(); this.DataContext = JDPal; pwdBoxADSL.Password = Settings.Default.ADSLPassword; pwdBoxTenpay.Password = Settings.Default.TenpayPassword; LogPath = System.Environment.CurrentDirectory + "\\DDEvent.log"; DDLog = new log(); }
private void DtgDataView_CellEnter(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex == -1 || e.ColumnIndex == -1) { return; } log kayit = entities.log.Find(Convert.ToInt32(dataViewer.dtgDataView.CurrentRow.Cells["ID"].Value)); rchAciklama.Text = "\n" + kayit.details; }
// Use this for initialization void Start() { //pec = new GameObject[arraySize]; grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); source = GetComponent<AudioSource>(); result = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Timer>(); scriptLog = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>(); }
public ActionResult Edit([Bind(Include = "id,Tc,Ad,Soyad,Kuladi,Sifre,Mail,Telefon,Aciltel,Cinsiyet,Doğum,Medeni,Kultip,Kulil,Kulilçe,Adres,İban,Başlama,Ayrılma,Okul,Bölüm,Resim")] log log) { if (ModelState.IsValid) { db.Entry(log).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(log)); }
public static void Agregar(eTipoLog tipo, string descripcion) { log l = new log(); l.descripcion = descripcion; l.fecha = DateTime.Now; l.tipo = (int)tipo; _db.logs.Add(l); _db.SaveChanges(); }
public log GetDbObject(log dbItem) { dbItem.id = this.Id; dbItem.timestamp = this.Timestamp; dbItem.application = this.Application; dbItem.ip = this.Ip; dbItem.user = this.User; dbItem.action = this.Action; dbItem.data = this.Data; return(dbItem); }
public ActionResult Edit([Bind(Include = "id,MaNV,HoatDong,Bang")] log log) { if (ModelState.IsValid) { db.Entry(log).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaNV = new SelectList(db.NhanViens, "MaNV", "HoTen", log.MaNV); return(View(log)); }
private void btnAgregarDeposito_Click(object sender, EventArgs e) { try { deposito depositoNuevo = new deposito { IdOperador = opSeleccionado.IdOperador, IdViajeSci = idViaje, Monto = double.Parse(textMonto.Text), Tipo = comboTipoDeposito.Text, Referencia = textReferencia.Text, Fecha = DateTime.Now, Nota = textNota.Text }; if (managerDeposito.Insertar(depositoNuevo)) { deposito lastDeposito = managerDeposito.BuscarUltimoIngresado(); log registro = new log { Accion = "agregar", NombreUsuario = user.NombreUsuario, Fecha = DateTime.Now, ModuloAfectado = "deposito-id:" + lastDeposito.IdDeposito }; managerLog.Insertar(registro); //Se tiene que actualizar el monto total de saldo del operador en el viaje operadoresenviaje opEnElViaje = managerOperadorEnViaje.BuscarPorIdViajeOpsyOperador(idViaje, opSeleccionado.IdOperador); if (opEnElViaje != null) { opEnElViaje.SaldoActual += depositoNuevo.Monto; if (managerOperadorEnViaje.Actualizar(opEnElViaje)) { resultado = "Se ha registrado correctamente el nuevo abono."; //MessageBox.Show("Se han ingresado correctamente el nuevo Deposito.", "Actualización de Depósitos", MessageBoxButtons.OK, MessageBoxIcon.Information); cargarTodosLosDepositos(); textMonto.Clear(); comboTipoDeposito.Text = string.Empty; textReferencia.Text = string.Empty; textNota.Text = string.Empty; } } } else { MessageBox.Show(managerDeposito.Error, "Error al ingresar el nuevo Deposito.", MessageBoxButtons.OK, MessageBoxIcon.Error); } } catch { MessageBox.Show("Revisa por favor que los campos tengan el tipo de dato correcto.", "Error al ingresar el nuevo Deposito.", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public static async Task LogInformation(string info, string classLocation, LogRepository logger) { log log = new log { Class = classLocation, Type = "INFO", Message = DateTime.Now.ToString() + " - " + info, }; await logger.Insert(log); }
/// <summary> /// 添加日志 /// </summary> /// <param name="log"></param> private void appendLog(log log) { //if (log.Services == null) Console.WriteLine(log.Type.ToString()); //else if (log.Services.Hosts == null) Console.WriteLine(log.Type.ToString() + "[" + log.Services.Name + "]"); //else Console.WriteLine(log.Type.ToString() + "[" + log.Services.Name + "] " + log.Services.Hosts.ToJson()); logStream.Append(log); if (isSaveCacheFile == 0) { isSaveCacheFile = 1; fastCSharp.threading.task.Tiny.Add(this, thread.callType.TcpRegisterSaveCacheFile); } }
public async Task <ActionResult> Edit([Bind(Include = "logId,mortalId,dateTime_2,areaCode")] log log) { if (ModelState.IsValid) { db.Entry(log).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.mortalId = new SelectList(db.mortals, "mortalId", "name", log.mortalId); return(View(log)); }
private void setEgateHome(int Rut, log logs) { if (ConfigurationManager.AppSettings["eHome:" + Rut.ToString()] != null) { logs.egateHome = ConfigurationManager.AppSettings["eHome:" + Rut.ToString()]; } else { logs.egateHome = "EGATE_HOME"; logs.putLog(1, "Se establece home (egateHome): " + logs.egateHome); } }
public ActionResult Edit([Bind(Include = "id_log,dta_log,banco_dados,entidade,id_entidade,id_usuario,id_acao")] log log) { if (ModelState.IsValid) { db.Entry(log).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.id_acao = new SelectList(db.acao, "id_acao", "nome", log.id_acao); ViewBag.id_usuario = new SelectList(db.usuario, "id_usuario", "id_usuario", log.id_usuario); return(View(log)); }
public IHttpActionResult Postlog(log log) { if (!ModelState.IsValid) { return(BadRequest(ModelState)); } log.fechahora = DateTime.Now; db.logs.Add(log); db.SaveChanges(); return(CreatedAtRoute("DefaultApi", new { id = log.log_sk }, log)); }
public ActionResult Create([Bind(Include = "id,MaNV,HoatDong,Bang")] log log) { if (ModelState.IsValid) { db.logs.Add(log); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.MaNV = new SelectList(db.NhanViens, "MaNV", "HoTen", log.MaNV); return(View(log)); }
protected void Button1_Command(object sender, CommandEventArgs e) { int MeetingID = Convert.ToInt32(e.CommandArgument); string[] name; string title; SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["Connection"]); conn.Open(); string sqlstr = "select * from MyMeeting where MeetingID=" + MeetingID.ToString(); SqlCommand comm = new SqlCommand(sqlstr, conn); SqlDataReader dr = comm.ExecuteReader(); if (dr.Read()) { name = dr["personnel"].ToString().Trim(';').Split(';'); title = dr["title"].ToString(); } else { Response.Write("<script>alert('删除失败!')</script>"); return; } conn.Close(); SqlConnection con = new SqlConnection(ConfigurationManager.AppSettings["Connection"]); con.Open(); string sql = "delete from MyMeeting where MeetingID=" + MeetingID; SqlCommand com = new SqlCommand(sql, con); com.ExecuteReader(); con.Close(); SqlConnection connn = new SqlConnection(ConfigurationManager.AppSettings["Connection"]); connn.Open(); foreach (string item in name) { string sql1 = "delete from Meeting where personnel='" + item + "' and addtime= '" + e.CommandName + "'"; SqlCommand commm = new SqlCommand(sql1, connn); commm.ExecuteNonQuery(); } connn.Close(); Bind(); log si = new log(); si.InsertWorkLog(Session["UserName"].ToString(), DateTime.Now.ToString(), "删除了主题为:" + title + "的会议"); Response.Write("<script>alert('删除成功!')</script>"); }
private Boolean validaRut(int Rut, Respuesta resp, log logs) { Boolean result = true; if (Rut == 0) { resp.SCodigo = ERROR_RUT_VACIO; resp.SMensaje = "Rut No puede estar vacio"; result = false; logs.putLog(1, "-- Rut No puede estar vacio"); } return(result); }
public IHttpActionResult PostEmaployee(log data) { try { db.logs.Add(data); db.SaveChanges(); return(Ok(data)); } catch (Exception) { return(Content(HttpStatusCode.InternalServerError, "Sql server not connected")); } }
// Use this for initialization void Start() { grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); pecScript = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<PecCard>(); rend = GetComponent<Renderer>(); partOrigin = gameObject.transform.position; color = rend.material.color; player1 = (GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[0].playerIndex == 0) ? GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[0] : GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[1]; player2 = GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[1]; logScript = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<log>(); }
// Use this for initialization void Start() { rend = GetComponent<Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>(); source = GetComponent<AudioSource>(); pec = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PecCard>(); scoreKeep = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<socket>(); scoreVector = new Vector3 (0,25,0); }
public long Insert(BaseError error) { var exp = new log { applicationid = error.ApplicationName, creationdate = error.CreationDate, detail = error.Detail, errorhash = error.ErrorHash, httpmethod = error.HTTPMethod, host = error.Host, ipaddress = error.IPAddress, machinename = error.MachineName, message = error.Message, sql = error.SQL, source = error.Source, statuscode = error.StatusCode, type = error.Type, url = error.Url, fulljson = JsonConvert.SerializeObject(error), errorlevel = (byte) (error.ErrorLevel?? ErrorLevel.Error) }; return this.Insert(exp); }
/// <summary> /// Creates a new row in the database /// </summary> /// <returns>Insert ID of the new row</returns> public override int New() { base.New(); CurrentRow = new log(); CurrentRow.created = DateTime.Now; CurrentRow.person_id = App.CurrentUser != null && App.CurrentUser.id > 0 ? App.CurrentUser.id : Model.Person.ANONYMOUS; CurrentConnection.logs.InsertOnSubmit(CurrentRow); CurrentConnection.SubmitChanges(); return Save(); }
/// <summary> /// Load the model with the specified ID /// </summary> /// <param name="LogId">The ID of the row in the database</param> /// <returns>True on success, False on failure</returns> public override bool Load(int LogId) { base.Load(LogId); CurrentConnection = new DatabaseDataContext(); var q = from x in CurrentConnection.logs where x.id.Equals(LogId) && x.deleted.Equals(0) select x; CurrentRow = q.FirstOrDefault(); return true; }
/// <summary> /// 画面初始化加载 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void LoadForm_Load(object sender, EventArgs e) { //读取参数表 try { SetLangeage(); dlog = new log(); dlog.CreatLogFile("load_reader_log.txt"); Setfile = new Setting(); sparmas = Setfile.ReadParams(); } catch (System.Exception ex) { try { SetDefault(); } catch (System.Exception ex2) { IsExit = true; this.Close(); return; } } powerC = new PowerC((PowerControl.PDA_Type)sparmas.PdaType); if (sparmas.PdaType != 1 && sparmas.PdaType != 4 && sparmas.PdaType != -1) powerC.PowerUP(); if (sparmas.RunType == 1) { Funpercent = HandlePercent; RunThread = new Thread(new ThreadStart(Running)); RunThread.Start(); Runningl = true; } else this.Close(); }