public GenericResult <IEnumerable <SelectModel> > GetSelectClientes() { GenericResult <IEnumerable <SelectModel> > result = new GenericResult <IEnumerable <SelectModel> >(); try { List <SelectModel> select = new List <SelectModel>(); var clientes = service.List(new ClienteFilter()); foreach (var cliente in clientes) { SelectModel model = new SelectModel(); model.Value = cliente.Id.ToString(); model.Label = cliente.Nome; select.Add(model); } result.Result = select.AsEnumerable(); } catch (Exception ex) { result.Errors = new string[] { ex.Message }; } return(result); }
public SelectModel SupBillListSelect(int pageIndex, int pageSize, string orderStr) { SelectModel select = new SelectModel(); select.PageIndex = pageIndex; select.PageSize = pageSize; if (string.IsNullOrEmpty(orderStr)) { select.OrderStr = " SupBillId desc"; } else { select.OrderStr = orderStr; } select.ColumnName = "SupBillId,BillDate,PayDate,sbl.PayCity,sbl.SupId,sup.SupName as SupName,BillPensionIns,BillMedicalIns,BillUnempIns,BillInjuryIns,BillBirthIns,BillDisabledIns,BillIllnessIns,BillHeatAmount,BillHouseFund,BillRepInjuryIns,CorpOtherPay,EmpOtherPay,sbl.ServiceAmount,TotalAmount,SupBillStatus,sd.DetailName as StatusName"; System.Text.StringBuilder sb = new StringBuilder(); sb.Append(" Usr_SupBill sbl"); sb.Append(" inner join Usr_Supplier sup on sup.SupId = sbl.SupId"); sb.AppendFormat(" inner join bd_StyleDetail sd on sd.DetailId = sbl.SupBillStatus and sd.StyleId = 5", (int)StyleTypeEnum.通用状态); select.TableName = sb.ToString(); //sb.Length = 0; //sb.AppendFormat(" and di.PositionStatus >{0} ", (int)StatusEnum.已作废); //select.WhereStr = sb.ToString(); return(select); }
private void ready(SelectModel sm) { if (sm.userId == GameData.user.id) { SendMessage("selectedHero"); } if (myRoom.inTeam(sm.userId) == 1) { foreach (SelectModel item in myRoom.teamOne) { if (item.userId == sm.userId) { item.heroId = sm.heroId; item.ready = sm.ready; } } } else { foreach (SelectModel item in myRoom.teamTwo) { if (item.userId == sm.userId) { item.heroId = sm.heroId; item.ready = sm.ready; } } } SendMessage("refreshView", myRoom); }
public CalendarViewModel(SelectModel selectModel, INavigationService navigationService) : base(navigationService) { this.SelectDateCommand = new Command(this.SelectDate); this.ButtonOkCommand = new Command(this.ButtonOk); this.GoBackCommand = new Command(this.GoBack); this.model = selectModel; }
public ResultModel LoadSupEmployeeList(int pageIndex, int pageSize, string orderStr, int supId) { SelectModel select = sql_insrance.EmployeeBySupIdSelect(pageIndex, pageSize, orderStr, supId); ResultModel result = Load(select); return(result); }
public void refresh(SelectModel model) { nText.text = model.name; //是否进入 if (model.enter) { //是否选择英雄 if (model.hero == -1) { head.sprite = Resources.Load <Sprite>("HeroIcon/nil"); } else { head.sprite = Resources.Load <Sprite>("HeroIcon/" + model.hero); } } else { head.sprite = Resources.Load <Sprite>("HeroIcon/notenter"); } //是否已经准备 if (model.ready) { selected(); } else { img.color = Color.white; } }
public SelectModel CorporationListSelect(int pageIndex, int pageSize, string orderStr, int corpId) { SelectModel select = new SelectModel(); select.PageIndex = pageIndex; select.PageSize = pageSize; if (string.IsNullOrEmpty(orderStr)) { select.OrderStr = " CorpId desc"; } else { select.OrderStr = orderStr; } select.ColumnName = "CorpId,CorpName,CorpAddress,CorpContacts,CorpTel,CorpEmail,sdcity.DetailName as PayCity,CorpStatus,sd.DetailName as StatusName"; System.Text.StringBuilder sb = new StringBuilder(); sb.Append(" Usr_Corporation corp"); sb.AppendFormat(" left join bd_StyleDetail sd on sd.DetailId = corp.CorpStatus and sd.StyleId = {0}", (int)StyleTypeEnum.通用状态); sb.AppendFormat(" left join bd_StyleDetail sdcity on sdcity.DetailId = corp.PayCity and sdcity.StyleId = {0}", (int)StyleTypeEnum.缴费城市类型); select.TableName = sb.ToString(); sb.Length = 0; if (corpId > 0) { sb.AppendFormat(" corp.CorpId = {0} ", corpId); } select.WhereStr = sb.ToString(); return(select); }
private FightPlayerModel Create(SelectModel model, int team) { FightPlayerModel player = new FightPlayerModel(); player.Id = model.UserID; player.Code = model.Hero; player.Name = GetUser(model.UserID).Name; player.Exp = 0; player.Level = 1; player.FreePoint = 1; player.Mongy = 0; player.Type = ModelType.HUMAN; //从配置表里取出对应的英雄数据,然后计算 HeroDataModel data = HeroData.heroMap[model.Hero]; player.Hp = data.HpBase; player.HpMax = data.HpBase; player.Atk = data.AtkBase; player.Def = data.DefBase; player.MoveSpeed = data.MoveSpeed; player.AtkSpeed = data.AtkSpeed; player.AtkRange = data.AtkRange; player.EyeRange = data.EyeRange; player.Skills = InitSkill(data.Skills); player.Team = team; player.Equs = new int[3]; return(player); }
/// <summary> /// 确认选择 /// </summary> /// <param name="playerID"></param> /// <returns></returns> public bool Ready(int playerID) { if (RedTeamSelectModels.ContainsKey(playerID)) { SelectModel selectModel = RedTeamSelectModels[playerID]; //检测有没有选英雄 if (selectModel.HeroID == -1) { return(false); } selectModel.IsReady = true; //更新准备的人数 _readyCount++; } else if (BlueTeamSelectModels.ContainsKey(playerID)) { SelectModel selectModel = BlueTeamSelectModels[playerID]; //检测有没有选英雄 if (selectModel.HeroID == -1) { return(false); } selectModel.IsReady = true; //更新准备的人数 _readyCount++; } return(true); }
public GenericResult <IEnumerable <SelectModel> > GetSelectJogosConta() { GenericResult <IEnumerable <SelectModel> > result = new GenericResult <IEnumerable <SelectModel> >(); try { List <SelectModel> select = new List <SelectModel>(); var compras = service.GetSelectJogosConta(); foreach (var compra in compras) { SelectModel model = new SelectModel(); model.Value = compra.Id.ToString(); model.Label = compra.Descricao; select.Add(model); } result.Result = select.AsEnumerable(); } catch (Exception ex) { result.Errors = new string[] { ex.Message }; } return(result); }
/// <summary> /// 获取查询Select流程状态数据 /// </summary> /// <param name="para"></param> /// <param name="item_Id"></param> /// <returns></returns> public JsonResult GetWorkflowStatusList() { var retModel = new JsonReturnModel(); try { List <SelectModel> list = new List <SelectModel>(); var result = WorkFlowBll.GetWorkflowStatusList(inn, "b_BusinessTravelWorkFlow"); if (!result.isError() && result.getItemCount() > 0) { for (int i = 0; i < result.getItemCount(); i++) { SelectModel model = new SelectModel(); var item = result.getItemByIndex(i); model.value = item.getProperty("keyed_name"); if (!string.IsNullOrEmpty(model.value)) { model.text = Common.GetChineseValueByParam(model.value, "BTManageWorkFlow", "WorkFlow", Userinfo.language); } list.Add(model); } } retModel.data = list; } catch (Exception ex) { retModel.AddError("errorMessage", ex.Message); } return(Json(retModel, JsonRequestBehavior.AllowGet)); }
private Text name; //名称 #endregion Fields #region Methods public void Refresh(SelectModel model) { name.text = model.Name; if (model.IsEnter) { if (model.Hero == -1) { head.sprite = Resources.Load<Sprite>("HeroIcon/nil"); } else { head.sprite = Resources.Load<Sprite>("HeroIcon/" + model.Hero); } } else { head.sprite = Resources.Load<Sprite>("HeroIcon/NoEnter"); } if (model.IsReady) { Selected(); } else { img.color = Color.white; } }
void select(SelectModel model) { if (ROOM == null) { return; } int id = model.userID; foreach (SelectModel item in ROOM.teamOne) { if (id == item.userID) { item.hero = model.hero; break; } } foreach (SelectModel item in ROOM.teamTwo) { if (id == item.userID) { item.hero = model.hero; break; } } //TODO 刷新UI界面 if (refeshSelectUI != null) { refeshSelectUI(ROOM); } }
public SelectModel SupBillReadyList(int pageIndex, int pageSize, string orderStr) { SelectModel select = new SelectModel(); select.PageIndex = pageIndex; select.PageSize = pageSize; if (string.IsNullOrEmpty(orderStr)) { select.OrderStr = " SupId desc"; } else { select.OrderStr = orderStr; } select.ColumnName = "SupId,SupName,SupAddress,SupContacts,SupTel,SupEmail,SupStatus,sd.DetailName as StatusName"; System.Text.StringBuilder sb = new StringBuilder(); sb.Append(" Usr_Supplier sup"); sb.AppendFormat(" inner join bd_StyleDetail sd on sd.DetailId = sup.SupStatus and sd.StyleId = {0}", (int)StyleTypeEnum.通用状态); select.TableName = sb.ToString(); //sb.Length = 0; //sb.AppendFormat(" and di.PositionStatus >{0} ", (int)StatusEnum.已作废); //select.WhereStr = sb.ToString(); return(select); }
private void AutoSelect(SelectModel sm) { var ss = FindObjectOfType <SelectScreen>(); //SelectEventUtil.selectHero(GameData.user.heroList[0]); if (sm.userId == GameData.user.id) { if (myRoom.inTeam(sm.userId) == 1) { foreach (SelectModel item in myRoom.teamOne) { if (item.userId == sm.userId) { item.heroId = sm.heroId; } } } else { foreach (SelectModel item in myRoom.teamTwo) { if (item.userId == sm.userId) { item.heroId = sm.heroId; } } } ss.refreshHeroList(myRoom); ss.clickStart(); Debug.Log("I ve selected hero and clicked ready " + sm.heroId); } }
public void UpdateView(SelectModel model) { txtName.text = model.playerName; imgBg.color = Color.white; //判断玩家是否进入 if (!model.isEnter) { ResourceManager.Instance.Load(Paths.RES_HEAD + "no-Connect", typeof(Sprite), this); return; } //进入之后 if (model.heroId != -1) { string path = Paths.RES_HEAD + HeroData.GetHeroData(model.heroId).Name; ResourceManager.Instance.Load(path, typeof(Sprite), this); } else { ResourceManager.Instance.Load(Paths.RES_HEAD + "no-Select", typeof(Sprite), this); } if (model.isReady) { imgBg.color = Color.green; txtState.text = "已选择"; } else { imgBg.color = Color.white; txtState.text = "正在选择..."; } }
private void select(SelectModel sm) { if (myRoom.inTeam(sm.userId) == 1) { foreach (SelectModel item in myRoom.teamOne) { if (item.userId == sm.userId) { item.heroId = sm.heroId; } } } else { foreach (SelectModel item in myRoom.teamTwo) { if (item.userId == sm.userId) { item.heroId = sm.heroId; } } } SendMessage("refreshView", myRoom); }
FightPlayerModel create(SelectModel model) { FightPlayerModel player = new FightPlayerModel(); player.id = model.userId; player.heroId = model.heroId; player.name = getUser(model.userId).name; player.exp = 0; player.level = 1; player.free = 1; player.money = 0; player.equs = new int[6]; //TODO 剩余数据 需要脚本载入 HeroDataModel data = HeroData.heroMap[model.heroId]; player.hp = data.hpBase; player.maxHp = data.hpBase; player.atk = data.atkBase; player.def = data.defBase; player.aspeed = data.aspeed; player.speed = data.speed; player.range = data.range; player.skills = initSkill(data.skills); return(player); }
private void AutoReady(SelectModel sm) { if (myRoom == null) { return; } if (myRoom.inTeam(sm.userId) == 1) { foreach (SelectModel item in myRoom.teamOne) { if (item.userId == sm.userId) { item.heroId = sm.heroId; item.ready = sm.ready; } } } else { foreach (SelectModel item in myRoom.teamTwo) { if (item.userId == sm.userId) { item.heroId = sm.heroId; item.ready = sm.ready; } } } FindObjectOfType <SelectScreen>().refreshHeroList(myRoom); }
public ResultModel LoadSupBillList(int pageIndex, int pageSize, string orderStr) { SelectModel select = sql_insrance.SupBillListSelect(pageIndex, pageSize, orderStr); ResultModel result = Load(select); return(result); }
public ResultModel LoadEmployeeSalaryByIdList(int pageIndex, int pageSize, string orderStr, int corpBillId) { SelectModel select = sql_insrance.EmployeeSalaryByCorpBillIdSelect(pageIndex, pageSize, orderStr, corpBillId); ResultModel result = Load(select); return(result); }
/// <summary> /// 确认选择 /// </summary> /// <param name="playerId"></param> /// <returns></returns> public bool Ready(int playerId) { if (team1Dict.ContainsKey(playerId)) { SelectModel model = team1Dict[playerId]; //不选择英雄 没办法确定 if (model.heroId == -1) { return(false); } model.isReady = true; //更新准备的人数 readyCount++; } else if (team2Dict.ContainsKey(playerId)) { SelectModel model = team2Dict[playerId]; //不选择英雄 没办法确定 if (model.heroId == -1) { return(false); } model.isReady = true; //更新准备的人数 readyCount++; } return(true); }
private void ready(SelectModel model) { if (model.userId == GameData.user.id) { //是自己准备了 进行状态处理 不准点击操作了 SelectEventUtil.selected(); } foreach (SelectModel item in room.teamOne) { if (item.userId == model.userId) { item.hero = model.hero; item.ready = true; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } foreach (SelectModel item in room.teamTwo) { if (item.userId == model.userId) { item.hero = model.hero; item.ready = true; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } }
/// <summary> /// 创建英雄单位 /// </summary> /// <param name="model"></param> /// <param name="team"></param> /// <returns></returns> FightPlayerModel create(SelectModel model, int team) { FightPlayerModel player = new FightPlayerModel(); player.id = model.userID; player.code = model.hero; player.type = ModelType.HUMAN; player.name = getUserName(model.userID); player.exp = 0; player.level = 1; player.free = 1; player.money = 0; player.team = team; //从配置表里 去出对应的英雄数据 HeroDataModel data = HeroData.heroMap[model.hero]; player.hp = data.hpBase; player.maxHp = data.hpBase; player.atk = data.atkBase; player.def = data.defBase; player.aSpeed = data.aSpeed; player.speed = data.speed; player.aRange = data.range; player.eyeRange = data.eyeRange; player.skills = initSkill(data.skills); player.equs = new int[3]; return(player); }
private void select(UserToken token, int value) { //判断玩家是否在房间里 if (!base.isEntered(token)) { return; } USER user = getUser(token); //判断玩家是否拥有此英雄 if (!user.heroList.Contains(value)) { write(token, SelectProtocol.SELECT_SRES, null); return; } //判断英雄队友是否已选 SelectModel selectModel = null; if (team.ContainsKey(user.id)) { foreach (SelectModel item in team.Values) { if (item.hero == value) { return; } } selectModel = team[user.id]; } //选择成功 通知房间所有人变更数据 selectModel.hero = value; brocast(SelectProtocol.SELECT_BRO, selectModel); }
public IEnumerable <GrpConfig> GetFapConfig(string configGroup) { var configs = _platformDomain.ParamSet.Where(p => p.ConfigGroup == configGroup); var dictList = configs.Where(p => p.DictList.IsPresent()); foreach (var item in dictList) { JObject jsonObj = JObject.Parse(item.DictList); Dictionary <string, string> dictObj = jsonObj.ToObject <Dictionary <string, string> >(); List <SelectModel> source = new List <SelectModel>(); foreach (var dic in dictObj) { SelectModel model = new SelectModel() { Code = dic.Key, Name = dic.Value }; if (dic.Key == item.ParamValue) { model.Selected = true; } source.Add(model); } item.DictSource = source; } var grpConfigs = configs.OrderBy(f => f.SortBy).GroupBy(c => c.ParamGroup); foreach (var item in grpConfigs) { GrpConfig gc = new GrpConfig(); gc.Grp = item.Key; gc.Configs = item.ToList(); yield return(gc); } }
private Text name; //名称 public void Refresh(SelectModel model) { name.text = model.Name; if (model.IsEnter) { if (model.Hero == -1) { head.sprite = Resources.Load <Sprite>("HeroIcon/nil"); } else { head.sprite = Resources.Load <Sprite>("HeroIcon/" + model.Hero); } } else { head.sprite = Resources.Load <Sprite>("HeroIcon/NoEnter"); } if (model.IsReady) { Selected(); } else { img.color = Color.white; } }
public void setData(SelectModel model) { nameText.text = model.name; if (model.entered) { if (model.heroId == -1) { head.sprite = nullSP; } else { head.sprite = ResourceLoad.getHead(model.heroId + ""); } } else { head.sprite = ResourceLoad.getHead("Image 19"); } if (model.ready) { selected(); } else { img.color = Color.white; } }
/// <summary> /// 选择英雄 /// </summary> /// <param name="selectModel"></param> private void Select(SelectModel selectModel) { foreach (SelectModel item in room.TeamOne) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } foreach (SelectModel item in room.TeamTwo) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } }
private void Ready(SelectModel selectModel) { if (selectModel.UserID == GameData.user.ID) { //禁止点击操作 SelectEventUtil.selected(); } foreach (SelectModel item in room.TeamOne) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; item.IsReady = true; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } foreach (SelectModel item in room.TeamTwo) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; item.IsReady = true; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } }
public SelectModel EmployeeSalaryListSelect(int pageIndex, int pageSize, string orderStr, int empId) { SelectModel select = new SelectModel(); select.PageIndex = pageIndex; select.PageSize = pageSize; if (string.IsNullOrEmpty(orderStr)) { select.OrderStr = " EmpSalaryId desc"; } else { select.OrderStr = orderStr; } select.ColumnName = "EmpSalaryId,emps.EmpId,emp.EmpName,emps.PayCity,sdcity.DetailName as PayCityName,emps.CorpId,CorpPensionIns,CorpMedicalIns,CorpUnempIns,CorpInjuryIns,CorpBirthIns,CorpDisabledIns,CorpIllnessIns,CorpHeatAmount,CorpHouseFund,CorpRepInjuryIns,CorpTotal,EmpPensionIns,EmpMedicalIns,EmpUnempIns,EmpInjuryIns,EmpBirthIns,EmpDisabledIns,EmpIllnessIns,EmpHeatAmount,EmpHouseFund,EmpRepInjuryIns,EmpTotal,PersonalTax,emps.TotalAmount,RepairAmount,GrossAmount,FinalAmount,ServiceAmount,RefundAmount,PayDate,EmpSalaryStatus"; System.Text.StringBuilder sb = new StringBuilder(); sb.Append(" Usr_EmployeeSalary emps"); sb.Append(" left join Usr_Employee emp on emp.EmpId = emps.EmpId"); sb.AppendFormat(" left join bd_StyleDetail sdcity on sdcity.DetailId = emps.PayCity and sdcity.StyleId = {0}", (int)StyleTypeEnum.缴费城市类型); select.TableName = sb.ToString(); sb.Length = 0; if (empId > 0) { sb.AppendFormat(" emps.EmpId ={0} ", empId); } select.WhereStr = sb.ToString(); return(select); }
public ActionResult Select(SelectModel selectModel) { var db = DAL.DbContext.Create(); if (selectModel.id <= 0) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } var studentToUpdate = db.Students.Get(selectModel.id); if (ModelState.IsValid) { studentToUpdate.EnrollmentDate = selectModel.EnrollmentDate; studentToUpdate.Message = selectModel.Message; //db.EnrollmentDateUpdate(selectModel.id, selectModel.EnrollmentDate); db.Students.Update(studentToUpdate.Id, studentToUpdate); return RedirectToAction("Index"); } return RedirectToAction("Index"); }
private void Ready(SelectModel selectModel) { if (selectModel.UserID == GameData.user.ID) { //禁止点击操作 SelectEventUtil.selected(); } foreach (SelectModel item in room.TeamOne) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; item.IsReady = true; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } foreach (SelectModel item in room.TeamTwo) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; item.IsReady = true; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } }
/// <summary> /// 选择英雄 /// </summary> /// <param name="selectModel"></param> private void Select(SelectModel selectModel) { foreach (SelectModel item in room.TeamOne) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } foreach (SelectModel item in room.TeamTwo) { if (item.UserID == selectModel.UserID) { item.Hero = selectModel.Hero; //刷新UI界面 SelectEventUtil.refreshView(room); return; } } }