/// <summary> /// In order protect the job, status and toner assign order, those fields were defined as private member. /// So use this interface to update those fields. /// </summary> public void UpdateStatusPanel(EnumStatus st, EnumMachineJob job, byte toner) { // NOTE: Don't change this assign order m_job = job; m_currentStatus = st; m_toner = toner; }
private void atualizaSituacaoFinalAluno(int idMatricula, int idTurma, EnumStatus status, decimal notaFinal) { try { var sql = @"UPDATE mt SET situacaoAluno = @situacaoAluno, notaFinal = @notaFinal FROM dbo.matriculaTurma mt WHERE idMatricula = @idMatricula AND idTurma = @idTurma"; conn.Open(); SqlCommand comm = conn.CreateCommand(); comm.CommandText = sql; comm.Parameters.Add(new SqlParameter("@situacaoAluno", status)); comm.Parameters.Add(new SqlParameter("@idMatricula", idMatricula)); comm.Parameters.Add(new SqlParameter("@idTurma", idTurma)); comm.Parameters.Add(new SqlParameter("@notaFinal", notaFinal)); comm.ExecuteNonQuery(); } catch (Exception e) { throw new Exception(e.Message); } finally { conn.Close(); } }
protected void changeStatus(EnumStatus _status) { switch (_status) { case EnumStatus.MOVE: MoveStart(); break; case EnumStatus.ATTACK: HitPlayer(); break; case EnumStatus.SPECIAL: SpecialStart(); break; case EnumStatus.DEATH: DeathStart(); break; default: break; } this._status = _status; }
public static string StatusString(EnumStatus status) { string text = ""; if (status == EnumStatus.New) { text = "New"; } if (status == EnumStatus.SharedForDoctors) { text = "Shared for doctors"; } if (status == EnumStatus.DuringVerification) { text = "During verification"; } if (status == EnumStatus.Verified) { text = "Verified"; } if (status == EnumStatus.WaitingForAdministratorAcceptance) { text = "Waiting for administrator acceptance"; } if (status == EnumStatus.DuringVerificationByTheDoctor) { text = "During verification by the doctor"; } if (status == EnumStatus.AcceptedByTheDoctor) { text = "Accepted by the doctor"; } return(text); }
private static Department GetDepartment(AuthContext _context, EnumStatus departmentCode) { var result = _context.Deparments.Where(x => string.Compare(x.Code, departmentCode.ToString(), true) == 0 && string.Compare(x.RecordStatus.Code, EnumStatus.ACT.ToString(), true) == 0); return(result.FirstOrDefault()); }
public Order(int id, DateTime OrDate, DateTime ShipDate) { OrderID = id; OrderDate = OrDate; ShippedDate = ShippedDate; Status = EnumStatus.Executed; }
public static bool IsStatusNeedMaintain(EnumStatus status) { return((status >= EnumStatus.PolygomotorOnTimeoutError && status <= EnumStatus.CTL_PRREQ_NSignalNoCome) || status == EnumStatus.ScanMotorError || status == EnumStatus.ScanDriverCalibrationFail || status == EnumStatus.NetWirelessDongleCfgFail); }
private static CostCentre GetCostCentre(AuthContext _context, EnumStatus costCentreCode) { var result = _context.CostCentres.Where(x => string.Compare(x.Code, costCentreCode.ToString(), true) == 0 && string.Compare(x.RecordStatus.Code, EnumStatus.ACT.ToString(), true) == 0); return(result.FirstOrDefault()); }
private static Employee GetEmployee(AuthContext _context, EnumStatus employeeCode) { var result = _context.Employees.Where(x => string.Compare(x.Code, employeeCode.ToString(), true) == 0 && string.Compare(x.RecordStatus.Code, EnumStatus.ACT.ToString(), true) == 0); return(result.FirstOrDefault()); }
public async Task <IEnumerable <Order> > GetOrders(EnumStatus status) { await Task.Delay(1000); List <Order> listToReturn = new List <Order>(); if (status == EnumStatus.All) // If Enum status is All, retrieve all orders using the OrderService. { foreach (var item in OrderService.GetAllOrders()) { listToReturn.Add(Converter.ConvertFromServiceOrder(item)); } } if (status == EnumStatus.Cancelled) // If Enum status is Cancelled, retrieve all cancelled orders using the OrderService. { foreach (var item in OrderService.GetCancelledOrders()) { listToReturn.Add(Converter.ConvertFromServiceOrder(item)); } } if (status == EnumStatus.Active) // If Enum status is Active, retrieve all active orders using the OrderService. { foreach (var item in OrderService.GetActiveOrders()) { listToReturn.Add(Converter.ConvertFromServiceOrder(item)); } } return(listToReturn); }
private void atualizaSituacaoAluno(int idAluno, int idTurma, int idModulo, EnumStatus status) { try { var sql = @"UPDATE nt SET situacaoAluno = @situacaoAluno FROM dbo.notaFalta nt WHERE idAluno = @idAluno AND idTurma = @idTurma AND idModulo = @idModulo"; conn.Open(); SqlCommand comm = conn.CreateCommand(); comm.CommandText = sql; comm.Parameters.Add(new SqlParameter("@situacaoAluno", status)); comm.Parameters.Add(new SqlParameter("@idAluno", idAluno)); comm.Parameters.Add(new SqlParameter("@idTurma", idTurma)); comm.Parameters.Add(new SqlParameter("@idModulo", idModulo)); comm.ExecuteNonQuery(); } catch (Exception e) { throw new Exception(e.Message); } finally { conn.Close(); } }
public async Task ExecuteAsync(EnumStatus status) { await SetStartVariablesAsync(); var requestId = -1; try { var request = await GetRequestAsync(status); if (request != default) { requestId = request.Id; await LogBeginRequestAsync(requestId); await _executor.ExecuteAsync(); await LogSuccessfullyConcludedAsync(requestId); } } catch (Exception e) { await LogErrorWaitingAnalyzeAsync(requestId, e); } finally { await LogTerminationExecutionAsync(requestId); } }
public Task(int id, string name, EnumStatus status, string info) { ID = id; ProjectName = name; Status = status; Info = info; }
private void Start() { EnumStatus e = new EnumStatus(); status = new bool[System.Enum.GetNames(e.GetType()).Length]; allowUI = gm.g_allowUI; }
public void Alterar(string descricao, EnumStatus status) { Descricao = descricao; Status = status; ValidarEntidade(); }
private static Portfolio GetPortfolio(AuthContext context, EnumStatus portfolioType) { var result = context.Portfolios.Where(x => string.Compare(x.Code, portfolioType.ToString(), true) == 0 && string.Compare(x.RecordStatus.Code, EnumStatus.ACT.ToString(), true) == 0); return(result.FirstOrDefault()); }
//public method public void GameOver(EnumStatus.Status status) { if (status == EnumStatus.Status.Win) GameWin(); else if (status == EnumStatus.Status.Lose) GameLose(); RestartGame(); }
public void SetStatus(EnumStatus value) { mStatus = value; if (IsCTLMOwned) { Enabled = ((Add && GetStatus() == EnumStatus.ADDNEW) || (Upp && GetStatus() == EnumStatus.EDIT && !PK) || (Del && GetStatus() == EnumStatus.DELETE) || (Search && GetStatus() == EnumStatus.SEARCH)) && !Protected; } }
private static LineManager GetReviewPeriodUser(AuthContext context, EnumStatus employeeCode) { var result = context.LineManagers.Include(x => x.EmployeeDetail). FirstOrDefault(x => string.Compare(x.EmployeeDetail.Code, employeeCode.ToString()) == 0 && string.Compare(x.RecordStatus.Code, EnumStatus.ACT.ToString(), true) == 0); return(result); }
public Produto(string descricao, EnumStatus status) { Descricao = descricao; Status = status; Cosifs = new List <Cosif>(); ValidarEntidade(); }
public PlayList(string nome, Usuario usuario, EnumStatus status) { Nome = nome; Usuario = usuario; Status = status; new AddNotifications <PlayList>(this) .IfNullOrInvalidLength(p => p.Nome, 2, 100, MSG.X0_OBRIGATORIA_E_DEVE_CONTER_ENTRE_X1_E_X2_CARACTERES.ToFormat("2", "100")); }
public void BasicTests(EnumStatus status, int aliveNumber, EnumStatus excepted) { var kata = new ConwayGame(status, aliveNumber); var actual = kata.GetNextStatus(); Assert.AreEqual(excepted, actual); }
public void SetStatus(EnumStatus value) { _status = value; if (value == EnumStatus.ADDNEW || value == EnumStatus.EDIT) { ReQuery(); } }
public void Alterar(Produto produto, EnumClassificacaoConta classificacaoConta, EnumStatus status) { Produto = produto; Classificacao = classificacaoConta; Status = status; ValidarEntidade(); }
private static ReviewPeriod GetReviewPeriod(AuthContext context, EnumStatus reviewPeriodCode) { var result = context.ReviewPeriods.Include(x => x.RecordStatus). Where(x => string.Compare(x.Code, reviewPeriodCode.ToString(), true) == 0 && string.Compare(x.RecordStatus.Code, EnumStatus.ACT.ToString(), true) == 0); return(result.FirstOrDefault()); }
public Cosif(Produto produto, EnumClassificacaoConta classificacaoConta, EnumStatus status) { Produto = produto; Classificacao = classificacaoConta; Status = status; Movimentos = new List <Movimento>(); ValidarEntidade(); }
private void OnFadeOutFinished(UITweener tweener) { if (_itemQueue.Count == 0) { displayBoard.SetActive(false); } _status = EnumStatus.idle; }
public virtual void EnemyDamaged(int power) { /* 武器に当たった時の処理 */ enemyData.HP -= power; _animator.SetTrigger("damaged"); _status = EnumStatus.MOVE; _knockCheck = true; Knockback(); }
public PlayList(string nome, UsuarioPlaylist usuarioPlaylist, EnumStatus status) { Nome = nome; UsuarioPlaylist = usuarioPlaylist; Status = status; new AddNotifications <PlayList>(this).IfNullOrInvalidLength(x => x.Nome, 2, 100); AddNotifications(usuarioPlaylist); }
public int SelectStatusId(EnumStatus enumstatus) { foreach (var item in ListStatus) { if (ClassStatus.StatusString(enumstatus) == item.Status) { return(item.StatusId); } } return(0); }
public Order(int id, string first, string last, int age, string email, bool vip, int sum, EnumStatus status) { Id = id; FirstName = first; LastName = last; Age = age; Email = email; VIP = vip; Sum = sum; Status = status; }
public void PassStatus(EnumStatus st, EnumMachineJob job, byte toner) { m_currentStatus = st; if (true == m_bSubmaskValidate && true == m_bIPValidate && true == m_bGatewayValidate) { btnApply.IsEnabled = (false == common.IsOffline(m_currentStatus)); } }
/// <summary> /// 创建Employee实体 /// </summary> /// <param name="_UserName">用户名</param> /// <param name="_PassWord">密码</param> /// <param name="_RealName">真实姓名</param> /// <param name="_Sex">性别</param> /// <param name="_Phone">手机号</param> /// <param name="_Tel">电话号</param> /// <param name="_Email">邮箱</param> /// <param name="_Open">是否开启</param> /// <returns>实体类型</returns> public static Employee CreateEmployee(string _UserName, string _PassWord, string _RealName, EnumStatus.SexStatus _Sex, string _Phone, string _Tel, string _Email, EnumStatus.OpenStatus _Open) { Employee employee = new Employee(); employee.UserName = _UserName; employee.PassWord = _PassWord; employee.RealName = _RealName; employee.Sex = _Sex; employee.Phone = _Phone; employee.Tel = _Tel; employee.Email = _Email; employee.Open = _Open; return employee; }
public Answer(EnumStatus status, String mensagem, object objeto) { this.Status = ((int)status).ToString(); this.Message = mensagem; var tipo = objeto.GetType(); if (tipo == typeof(Presentation)) { this.Presentation = (Presentation)objeto; } else if (tipo == typeof(List<Presentation>)) { this.Presentations = (List<Presentation>)objeto; } else if (tipo == typeof(List<Doctor>)) { this.Doctors = (List<Doctor>)objeto; } else if (tipo == typeof(string)) { this.QuantityNotUpdated = (string)objeto; } else if (tipo == typeof(AppInfo)) { this.AppInfo = (AppInfo)objeto; } else if (tipo == typeof(User)) { this.User = (User)objeto; } else if (tipo == typeof(List<PresentationComment>)) { this.PresentationComments = (List<PresentationComment>)objeto; } }
public Answer(EnumStatus status, String mensagem) { this.Status = ((int)status).ToString(); this.Message = mensagem; }
public Order(int id, DateTime OrDate) { OrderID = id; OrderDate = OrDate; Status = EnumStatus.InWork; }
public bool UpdateProductDetailsStatus(string productdetailid, EnumStatus status, string operateIP, string operateID) { return CommonBusiness.Update("ProductDetail", "Status", (int)status, " ProductDetailID='" + productdetailid + "'"); }
/// <summary> /// 编辑仓库状态 /// </summary> /// <param name="id"></param> /// <param name="status"></param> /// <param name="operateid"></param> /// <param name="clientid"></param> /// <returns></returns> public bool UpdateWareHouseStatus(string id, EnumStatus status, string operateid, string clientid) { return CommonBusiness.Update("WareHouse", "Status", (int)status, " WareID='" + id + "'"); }
public void Transfer(Dma.Direction Direction, int Size, DmaEnum Address, ref uint Value) { // Reading sector if ((Address >= DmaEnum.NAND__DATA_PAGE_START) && (Address < DmaEnum.NAND__DATA_PAGE_END)) { var Offset = (int)(Address - DmaEnum.NAND__DATA_PAGE_START); //Console.WriteLine("{0:X8}", (uint)Address); //Console.WriteLine("Transfer {0} / {1} [{2}]", Offset, Size, NandBlock.Length); TransferUtils.TransferToArray(Direction, NandBlock, Offset, Size, ref Value); return; } if ((Address >= DmaEnum.NAND__DATA_SPARE_BUF0_REG) && (Address < DmaEnum.NAND__DATA_EXTRA_END)) { var Offset = (int)(Address - DmaEnum.NAND__DATA_SPARE_BUF0_REG); TransferUtils.TransferToArray(Direction, NandBlock, 512 + Offset + 4, Size, ref Value); return; } switch (Address) { case DmaEnum.NAND__CONTROL: TransferUtils.Transfer(Direction, ref ControlRegister, ref Value); break; case DmaEnum.NAND__STATUS: TransferUtils.Transfer(Direction, ref Status, ref Value); //Thread.Sleep(200); break; case DmaEnum.NAND__COMMAND: TransferUtils.Transfer(Direction, ref Command, ref Value); // Reset if (Direction == Dma.Direction.Write) { switch ((EnumCommands)Value) { case EnumCommands.Reset: Status = EnumStatus.Ready; break; } } break; case DmaEnum.NAND__ADDRESS: TransferUtils.Transfer(Direction, ref Address, ref Value); break; case DmaEnum.NAND__RESET: if (Direction == Dma.Direction.Write) { Reset(); } break; case DmaEnum.NAND__DMA_ADDRESS: TransferUtils.Transfer(Direction, ref DmaAddress, ref Value); break; case DmaEnum.NAND__DMA_CONTROL: if (Direction == Dma.Direction.Write) { if (Value == 0x301) { //0x20000/2/512*(512+16) NandStream.Position = ((DmaAddress / 2 / 512) * (512 + 16)); NandBlock = NandStream.ReadBytes(512 + 16); Console.WriteLine("Read from NAND: 0x{0:X8}", DmaAddress); ArrayUtils.HexDump(NandBlock); //Thread.Sleep(TimeSpan.FromSeconds(0.5)); //Thread.Sleep(-1); } } else { Value = 0; } break; case DmaEnum.NAND__DMA_ERROR: Value = 0; break; } }
public bool UpdateProductAttrStatus(string attrid, EnumStatus status, string operateIP, string operateID) { var dal = new ProductsDAL(); var bl = dal.UpdateProductAttrStatus(attrid, (int)status); if (bl) { var model = GetAttrByID(attrid); CacheAttrs.Remove(model); } return bl; }
/// <summary> /// 编辑部门状态 /// </summary> /// <param name="departid">部门ID</param> /// <param name="status">状态</param> /// <param name="operateid">操作人</param> /// <param name="operateip">操作IP</param> /// <returns></returns> public EnumResultStatus UpdateDepartmentStatus(string departid, EnumStatus status, string operateid, string operateip) { if (status == EnumStatus.Delete) { object count = CommonBusiness.Select(" UserDepart ", " count(0) ", " DepartID='" + departid + "' and Status=1 "); if (Convert.ToInt32(count) > 0) { return EnumResultStatus.Exists; } } if (CommonBusiness.Update(" Department ", " Status ", (int)status, " DepartID='" + departid + "'")) { return EnumResultStatus.Success; } else { return EnumResultStatus.Failed; } }
/// <summary> /// 编辑部门状态 /// </summary> /// <param name="departid">部门ID</param> /// <param name="status">状态</param> /// <param name="operateid">操作人</param> /// <param name="operateip">操作IP</param> /// <returns></returns> public EnumResultStatus UpdateDepartmentStatus(string departid, EnumStatus status, string operateid, string operateip, string agentid) { if (status == EnumStatus.Delete) { object count = CommonBusiness.Select("UserDepart", "count(0)", "DepartID='" + departid + "' and Status=1"); if (Convert.ToInt32(count) > 0) { return EnumResultStatus.Exists; } } if (CommonBusiness.Update("Department", "Status", (int)status, "DepartID='" + departid + "' and AgentID='" + agentid + "'")) { var model = GetDepartments(agentid).Where(d => d.DepartID == departid).FirstOrDefault(); model.Status = (int)status; return EnumResultStatus.Success; } else { return EnumResultStatus.Failed; } }
public bool UpdateAttrValueStatus(string valueid, EnumStatus status, string operateIP, string operateID) { var dal = new ProductsDAL(); return dal.UpdateAttrValueStatus(valueid, (int)status); }
public bool UpdateCategoryAttrStatus(string categoryid, string attrid, EnumStatus status, int type, string operateIP, string operateID) { var dal = new ProductsDAL(); return dal.UpdateCategoryAttrStatus(categoryid, attrid, (int)status, type); }
public bool UpdateUnitStatus(string unitID, EnumStatus status, string operateIP, string operateID) { var dal = new ProductsDAL(); return dal.UpdateUnitStatus(unitID, (int)status); }
public bool UpdateProductStatus(string productid, EnumStatus status, string operateIP, string operateID) { return CommonBusiness.Update("Products", "Status", ((int)status).ToString(), " ProductID='" + productid + "'"); }
public Answer(EnumStatus status) { this.Status = ((int)status).ToString(); this.Message = String.Empty; }
public bool UpdateAttrValueStatus(string valueid, string attrid, EnumStatus status, string operateIP, string operateID) { var dal = new ProductsDAL(); bool bl = dal.UpdateAttrValueStatus(valueid, (int)status); if (bl) { var model = GetAttrByID(attrid); var value = model.AttrValues.Where(m => m.ValueID == valueid).FirstOrDefault(); model.AttrValues.Remove(value); } return bl; }
public bool UpdateProviderStatus(string providerid, EnumStatus status, string ip, string operateid) { return CommonBusiness.Update("Providers", "Status", (int)status, "ProviderID='" + providerid + "'"); }
public bool UpdateBrandStatus(string brandID, EnumStatus status, string operateIP, string operateID) { bool bl = CommonBusiness.Update("Brand", "Status", ((int)status).ToString(), " BrandID='" + brandID + "'"); return bl; }
public bool UpdateWareHouseStatus(string id, EnumStatus status, string operateid, string clientid) { bool bl= CommonBusiness.Update("WareHouse", "Status", (int)status, " WareID='" + id + "'"); if (bl) { var model = GetWareByID(id, clientid); if (status == EnumStatus.Delete) { WareHouses[clientid].Remove(model); } else { model.Status = (int)status; } } return bl; }
public bool UpdateWareHouseStatus(string id, EnumStatus status, string operateid, string clientid) { bool bl= CommonBusiness.Update("WareHouse", "Status", (int)status, " WareID='" + id + "'"); if (bl) { var model = GetWareByID(id, clientid); model.Status = (int)status; } return bl; }
public bool UpdateDepotSeatStatus(string id, EnumStatus status, string operateid, string clientid) { return CommonBusiness.Update("DepotSeat", "Status", (int)status, " DepotID='" + id + "'"); }
public Order(int id) { OrderID = id; Status = EnumStatus.New; }
public bool UpdateBrandStatus(string brandID, EnumStatus status, string operateIP, string operateID) { bool bl = CommonBusiness.Update("Brand", "Status", ((int)status).ToString(), " BrandID='" + brandID + "'"); if (bl) { string message = "编辑品牌状态为:" + CommonBusiness.GetEnumDesc(status); LogBusiness.AddOperateLog(operateID, "ProductsBusiness.UpdateBrandStatus", EnumLogType.Update, EnumLogModules.Stock, EnumLogEntity.Brand, brandID, message, operateIP); } return bl; }
public bool UpdateProductAttrStatus(string attrid, EnumStatus status, string operateIP, string operateID) { var dal = new ProductsDAL(); return dal.UpdateProductAttrStatus(attrid, (int)status); }