public SummaryRepositoryItemsContext Check(ISummaryRepositoryItem item) { var itemKey = item.Key; if (Key != itemKey) { throw new ArgumentException( "Переданный на проверку элемент не соответствует общему контексту по ключу:\r\n" + "ItemsContext.Key = '{0}'\r\n".FillWith(Key) + "Item.Key = '{0}'".FillWith(itemKey) ); } var itemType = item.GetType(); if (ItemsType != itemType) { throw new ArgumentException( "Переданный на проверку элемент не соответствует общему контексту по типу:\r\n" + "ItemsContext.ItemsType = '{0}'\r\n".FillWith(ItemsType.TypeName()) + "Item.GetType() = '{0}'".FillWith(itemType.TypeName()) ); } return(this); }
protected override IQueryOver <Nomenclature> ItemsQuery(IUnitOfWork uow) { NomenclatureJournalNode resultAlias = null; ItemsType itemsTypeAlias = null; Nomenclature nomenclatureAlias = null; var query = uow.Session.QueryOver <Nomenclature>(() => nomenclatureAlias); if (Filter.ItemType != null) { query.Where(x => x.Type.Id == Filter.ItemType.Id); } if (!Filter.ShowArchival) { query.Where(x => !x.Archival); } return(query .Left.JoinAlias(n => n.Type, () => itemsTypeAlias) .Where(GetSearchCriterion( () => nomenclatureAlias.Id, () => nomenclatureAlias.Name, () => nomenclatureAlias.Number, () => itemsTypeAlias.Name, () => nomenclatureAlias.Archival )) .SelectList((list) => list .Select(x => x.Id).WithAlias(() => resultAlias.Id) .Select(x => x.Name).WithAlias(() => resultAlias.Name) .Select(x => x.Number).WithAlias(() => resultAlias.Number) .Select(() => itemsTypeAlias.Name).WithAlias(() => resultAlias.ItemType) .Select(() => nomenclatureAlias.Archival).WithAlias(() => resultAlias.Archival) ).OrderBy(x => x.Name).Asc .TransformUsing(Transformers.AliasToBean <NomenclatureJournalNode>())); }
private SortedList <string, GEItem> ProcessItems(ItemsType items) { SortedList <string, GEItem> processedItems = new SortedList <string, GEItem>(); if (items == null) { return(processedItems); } foreach (ItemsTypeItem item in items.Item) { SortedList <string, GEMenuItem> menuItems = ProcessMenuItems(item.MenuItems, item.id); SortedList <string, GEProperty> properties = ProcessProperties(item.Properties); SortedList <string, GEText> texts = ProcessTexts(item.Texts); GEItem newItem = new GEItem(item.id, null, item.activeAtStart, item.equipable, null) { MenuItems = menuItems, Properties = properties, Texts = texts }; OnReferenceProcessing += delegate(object o, EventArgs e) { newItem.ItemName = elementManager.GetTextElement(item.nameTextId); newItem.Description = elementManager.GetTextElement(item.descTextId); }; elementManager.AddItem(newItem); processedItems.Add(item.id, newItem); } return(processedItems); }
public List <ItemsType> getAllItem() { List <ItemsType> list = new List <ItemsType>(); string sql = "SELECT [idLoaiVP] ,[nameLoaiVP] ,[url] ,[id_VP] FROM [dbo].[LoaiVatPham]"; SqlCommand command = new SqlCommand(sql, connection); command.Connection.Open(); SqlDataReader data = command.ExecuteReader(); if (data.HasRows) { while (data.Read()) { ItemsType it = new ItemsType(); it.ID = Convert.ToInt32(data["idLoaiVP"].ToString()); it.Name = data["nameLoaiVP"].ToString(); it.Url = data["url"].ToString(); it.id_VP = Convert.ToInt32(data["id_VP"].ToString()); list.Add(it); } } command.Connection.Close(); return(list); }
public bool AddItem(ElementIndex itemIndex, int number = 1) // 添加物品到背包 { if (itemIndex.first < 0 || itemIndex.second < 0 || number < 0) { return(false); } ItemsType item = ResourcesManager.instance.itemsPool [itemIndex.first] [itemIndex.second]; for (int i = 0; i < bagContent.Count; ++i) { if (bagContent [i].ID == item.ID) { if (item.usingtimes <= 0) // 不允许叠加无限耐久度的物品 { return(true); } ItemsType tmp = bagContent [i]; tmp.number += number; tmp.cur_usingtimes = (int)tmp.usingtimes; bagContent [i] = tmp; return(true); } } item.number = number; item.cur_usingtimes = (int)item.usingtimes; bagContent.Add(item); return(true); }
public String update(ItemsType p, String userId) { String re = ""; String sql = ""; int chk = 0; chkNull(p); sql = "Update " + itmT.table + " Set " + " " + itmT.item_type_code + " = '" + p.item_type_code + "'" + "," + itmT.item_type_name_e + " = '" + p.item_type_name_e.Replace("'", "''") + "'" + "," + itmT.item_type_name_t + " = '" + p.item_type_name_t.Replace("'", "''") + "'" + "," + itmT.remark + " = '" + p.remark.Replace("'", "''") + "'" + "," + itmT.date_modi + " = now()" + "," + itmT.user_modi + " = '" + userId + "' " + "," + itmT.sort1 + " = '" + p.sort1 + "' " + "," + itmT.item_group_id + " = '" + p.item_group_id + "' " + "Where " + itmT.pkField + "='" + p.item_type_id + "'" ; try { re = conn.ExecuteNonQuery(conn.conn, sql); } catch (Exception ex) { sql = ex.Message + " " + ex.InnerException; } return(re); }
private void InitData() { TestItems = new ItemsType(); // Should be added TestItems.Add( new ItemTypeExtended { FirstName = "X1", Surname = "S1", CardNumber = "12345", Amount = 25.67 } ); // Shoudn't be added -- card number contain not only digits TestItems.Add( new ItemTypeExtended { FirstName = "X2", Surname = "S2", CardNumber = "12345 ", Amount = 12.1 } ); // Shoudn't be added -- card number contain not only digits TestItems.Add( new ItemTypeExtended { FirstName = "X3", Surname = "S3", CardNumber = "12345B", Amount = 13 } ); // Shoudn't be added -- card number already exist TestItems.Add( new ItemTypeExtended { FirstName = "X4", Surname = "S4", CardNumber = "12345", Amount = 0.03 } ); // Should be added TestItems.Add( new ItemTypeExtended { FirstName = "X5", Surname = "S5", CardNumber = "123456", Amount = 0.03 } ); // Should be added TestItems.Add( new ItemTypeExtended { FirstName = "X5", Surname = "S5T1", CardNumber = "1234567", Amount = 0.02 } ); // Should be added TestItems.Add( new ItemTypeExtended { FirstName = "X5T1", Surname = "S5", CardNumber = "12345678", Amount = 0.01 } ); // Shoudn't be added -- full name already exist TestItems.Add( new ItemTypeExtended { FirstName = "X5T1", Surname = "S5", CardNumber = "123456789", Amount = 0 } ); }
} //END OF Modifiers public SampleCDBFile(TextAsset castleDBAsset) { parsedDB = new CastleDBParser(castleDBAsset); Creatures = new CreaturesType(); Items = new ItemsType(); Modifiers = new ModifiersType(); }
private void initConfig() { itmT = new ItemsType(); itmT.item_type_id = "item_type_id"; itmT.item_type_code = "item_type_code"; itmT.item_type_name_e = "item_type_name_e"; itmT.item_type_name_t = "item_type_name_t"; //tmn.status_app = "status_app"; itmT.sort1 = "sort1"; itmT.active = "active"; itmT.date_create = "date_create"; itmT.date_modi = "date_modi"; itmT.date_cancel = "date_cancel"; itmT.user_create = "user_create"; itmT.user_modi = "user_modi"; itmT.user_cancel = "user_cancel"; itmT.item_group_id = "item_group_id"; itmT.remark = "remark"; itmT.table = "b_items_type"; itmT.pkField = "item_type_id"; lExpnT = new List <ItemsType>(); }
public void GetReferencedDocuments_WriteOffTest() { var interactive = Substitute.For <IInteractiveQuestion>(); interactive.Question(string.Empty).ReturnsForAnyArgs(true); var baseParameters = Substitute.For <BaseParameters>(); using (var uow = UnitOfWorkFactory.CreateWithoutRoot()) { var warehouse = new Warehouse(); uow.Save(warehouse); var nomenclatureType = new ItemsType { Name = "Тестовый тип номенклатуры" }; uow.Save(nomenclatureType); var nomenclature = new Nomenclature { Type = nomenclatureType }; uow.Save(nomenclature); var employee = new EmployeeCard(); uow.Save(employee); var expense = new Expense { Date = new DateTime(2021, 9, 10), Employee = employee, Operation = ExpenseOperations.Employee, Warehouse = warehouse, }; var size = new Size(); var height = new Size(); uow.Save(size); uow.Save(height); var stockPosition = new StockPosition(nomenclature, 0, size, height); var item = expense.AddItem(stockPosition, 10); expense.UpdateOperations(uow, baseParameters, interactive); uow.Save(expense); //Списываем 3 штуки var writeoff = new Writeoff() { Date = new DateTime(2021, 9, 11), }; var writeoffItem = writeoff.AddItem(item.EmployeeIssueOperation, 2); writeoff.UpdateOperations(uow); uow.Save(writeoff); uow.Commit(); var repository = new EmployeeIssueRepository(uow); var result = repository.GetReferencedDocuments(writeoffItem.EmployeeWriteoffOperation.Id); Assert.That(result.First().DocumentType, Is.EqualTo(StokDocumentType.WriteoffDoc)); Assert.That(result.First().DocumentId, Is.EqualTo(writeoff.Id)); Assert.That(result.First().ItemId, Is.EqualTo(writeoffItem.Id)); } }
private void Update() { //displaying the items types names for (int i = 0; i < itemsTypes.Count; i++) { itemsTypeUIDisplayers[i].typeNameText.text = itemsTypes[i].typeName; } //displayingg the items info like : name, icon, ... if (itemsTypes.Count > 0) { //first we should check that the selected items type is not null if (selectedItemsType == null) { selectedItemsType = itemsTypes[0]; } //then we display the info of each item for (int i = itemsStartingIndex; i - selectedItemsType.items.Count <= 9; i++) { int displayItemsIndex = i - itemsStartingIndex; itemsUIDisplayers[displayItemsIndex].nameText.text = selectedItemsType.items[i].displayName; itemsUIDisplayers[displayItemsIndex].iconImage.sprite = selectedItemsType.items[i].icon; itemsUIDisplayers[displayItemsIndex].clickButton.gameObject.GetComponent <ItemCreateButton>().myObject = selectedItemsType.items[i].prefab; } } }
private void initConfig() { itmT = new ItemsType(); fEdit = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Regular); fEditB = new Font(xC.iniC.grdViewFontName, xC.grdViewFontSize, FontStyle.Bold); C1ThemeController.ApplicationTheme = xC.iniC.themeApplication; theme1.Theme = C1ThemeController.ApplicationTheme; theme1.SetTheme(sB, "BeigeOne"); foreach (Control c in panel3.Controls) { theme1.SetTheme(c, "Office2013Red"); } bg = txtCode.BackColor; fc = txtCode.ForeColor; ff = txtCode.Font; txtPasswordVoid.KeyUp += TxtPasswordVoid_KeyUp; btnNew.Click += BtnNew_Click; btnEdit.Click += BtnEdit_Click; btnSave.Click += BtnSave_Click; xC.iniDB.itmGrpDB.setC1CboItmGrp(cboFItm, ""); initGrfDept(); setGrfDeptH(); setControlEnable(false); setFocusColor(); sB1.Text = ""; btnVoid.Hide(); txtPasswordVoid.Hide(); stt = new C1SuperTooltip(); sep = new C1SuperErrorProvider(); //stt.BackgroundGradient = C1.Win.C1SuperTooltip.BackgroundGradient.Gold; }
private void setItem() { itm.item_id = txtID.Text; itm.item_code = txtCode.Text; itm.item_name_t = txtNameT.Text; itm.remark = txtRemark.Text; itm.item_type_sub_id = cboItmts.SelectedItem != null ? ((ComboBoxItem)(cboItmts.SelectedItem)).Value : ""; itm.item_cat_id = cboItmC.SelectedItem != null ? ((ComboBoxItem)(cboItmC.SelectedItem)).Value : ""; itm.item_grp_id = cboItmG.SelectedItem != null ? ((ComboBoxItem)(cboItmG.SelectedItem)).Value : ""; itm.status_invoice = chkVat.Checked ? "1" : "0"; itm.status_tax53 = chkTax53.Checked ? "1" : "0"; itm.acc_code = txtAccCode.Text; itm.f_method_payment_id = cboFMtp.SelectedItem != null ? ((ComboBoxItem)(cboFMtp.SelectedItem)).Value : ""; itm.price1 = txtPrice1.Text; itm.price2 = txtPrice2.Text; itm.price3 = txtPrice3.Text; itm.price4 = txtPrice4.Text; itm.price5 = txtPrice5.Text; itm.unit_id = cboUtp.SelectedItem != null ? ((ComboBoxItem)(cboUtp.SelectedItem)).Value : ""; itm.item_group_id = txtItmGroupId.Text; if (itm.item_group_id.Equals("")) { ItemsTypeSub itmts = new ItemsTypeSub(); ItemsType itmt = new ItemsType(); itmts = xC.iniDB.itmtsDB.selectByPk1(itm.item_type_sub_id); itmt = xC.iniDB.itmtDB.selectByPk1(itmts.item_type_id); itm.item_group_id = itmt.item_group_id; } itm.tax_id = cboTax.SelectedItem != null ? ((ComboBoxItem)(cboTax.SelectedItem)).Value : ""; itm.status_hide = chkStatusServ.Checked ? "1" : "0"; }
public static float getValue(ItemsType type) { float _value; items.TryGetValue(type, out _value); return(_value); }
/// <summary> /// Gets the level. /// </summary> /// <returns>The level.</returns> /// <param name="itemsType">Items type.</param> public static int getLevel(ItemsType itemsType) { Items _item; items.TryGetValue(itemsType, out _item); return(_item.Level); }
/// <summary> /// Gets the type. /// </summary> /// <returns>The type.</returns> /// <param name="itemsType">Items type.</param> public static ItemsType getType(ItemsType itemsType) { Items _item; items.TryGetValue(itemsType, out _item); return(_item.Item); }
/// <summary> /// Gets the value. /// </summary> /// <returns>The value.</returns> /// <param name="itemsType">Items type.</param> public static float getValue(ItemsType itemsType) { Items _item; items.TryGetValue(itemsType, out _item); return(_item.Value); }
private void setControl(String deptId) { itmT = xC.iniDB.itmtDB.selectByPk1(deptId); txtID.Value = itmT.item_type_id; txtCode.Value = itmT.item_type_code; txtNameT.Value = itmT.item_type_name_t; txtRemark.Value = itmT.remark; xC.setC1Combo(cboFItm, itmT.item_group_id); }
public void CanAddMultiRowWithSameNomenclatureTest() { var ask = Substitute.For <IInteractiveQuestion>(); ask.Question(string.Empty).ReturnsForAnyArgs(true); using (var uow = UnitOfWorkFactory.CreateWithoutRoot()) { var warehouse = new Warehouse(); uow.Save(warehouse); var sizeType = new SizeType(); uow.Save(sizeType); var nomenclatureType = new ItemsType { Name = "Тестовый тип номенклатуры", SizeType = sizeType }; uow.Save(nomenclatureType); var nomenclature = new Nomenclature { Type = nomenclatureType }; uow.Save(nomenclature); var sizeX = new Size { Name = "X", SizeType = sizeType }; var sizeXl = new Size { Name = "XL", SizeType = sizeType }; uow.Save(sizeX); uow.Save(sizeXl); var income = new Income { Warehouse = warehouse, Date = new DateTime(2017, 1, 1), Operation = IncomeOperations.Enter }; var incomeItem1 = income.AddItem(nomenclature); incomeItem1.WearSize = sizeX; incomeItem1.Amount = 10; var incomeItem2 = income.AddItem(nomenclature); incomeItem2.WearSize = sizeXl; incomeItem2.Amount = 5; income.UpdateOperations(uow, ask); var validator = new QS.Validation.ObjectValidator(); Assert.That(validator.Validate(income), Is.True); uow.Save(income); uow.Commit(); var stock = new StockRepository() .StockBalances(uow, warehouse, new List <Nomenclature> { nomenclature }, new DateTime(2017, 1, 2)); Assert.That(stock.Count, Is.EqualTo(2)); } }
public void HandleDelete_CanDeleteEmployeeTest() { var ask = Substitute.For <IInteractiveQuestion>(); ask.Question(string.Empty).ReturnsForAnyArgs(true); using (var uow = UnitOfWorkFactory.CreateWithoutRoot("Тест на обработку удаления сотрудника")) { BuisnessLogicGlobalEventHandler.Init(ask, UnitOfWorkFactory); var nomenclatureType = new ItemsType(); nomenclatureType.Name = "Тестовый тип номенклатуры"; uow.Save(nomenclatureType); var nomenclature = new Nomenclature(); nomenclature.Type = nomenclatureType; uow.Save(nomenclature); var protectionTools = new ProtectionTools(); protectionTools.Name = "СИЗ для тестирования"; protectionTools.AddNomeclature(nomenclature); uow.Save(protectionTools); var norm = new Norm(); var normItem = norm.AddItem(protectionTools); normItem.Amount = 1; normItem.NormPeriod = NormPeriodType.Month; normItem.PeriodCount = 2; uow.Save(norm); var employee = new EmployeeCard(); uow.Save(employee); var warehouseOperation = new WarehouseOperation(); var expenseOp = new EmployeeIssueOperation(); expenseOp.OperationTime = warehouseOperation.OperationTime = new DateTime(2019, 1, 1); expenseOp.ExpiryByNorm = new DateTime(2019, 4, 1); expenseOp.ProtectionTools = protectionTools; expenseOp.Employee = employee; expenseOp.Nomenclature = warehouseOperation.Nomenclature = nomenclature; expenseOp.NormItem = normItem; warehouseOperation.Amount = expenseOp.Issued = 1; expenseOp.WarehouseOperation = warehouseOperation; uow.Save(nomenclature); uow.Save(normItem); uow.Save(warehouseOperation); uow.Save(expenseOp); uow.Commit(); //FIXME Временно чтобы переделака не вызвала конфликт мержа в 2.4 Configure.ConfigureDeletion(); var deletion = new DeleteCore(DeleteConfig.Main, uow); deletion.PrepareDeletion(typeof(EmployeeCard), employee.Id, CancellationToken.None); deletion.RunDeletion(CancellationToken.None); } }
public static void removeItems(ItemsType type, float value) { float _value; if (items.TryGetValue(type, out _value)) { items.Remove(type); _value -= value; } items.Add(type, _value); }
public static void addItems(ItemsType type, float value) { float _value; if (items.TryGetValue(type, out _value)) { items.Remove(type); value += _value; } items.Add(type, value); }
public void SetSelectedItemsType(int itemIndex) { //setting the items UI displayers info to there default values for (int i = 0; i < 9; i++) { itemsUIDisplayers[i].iconImage.sprite = defaultItemSprite; itemsUIDisplayers[i].nameText.text = ""; itemsUIDisplayers[i].clickButton.gameObject.GetComponent <ItemCreateButton>().myObject = null; } itemsStartingIndex = 0; selectedItemsType = itemsTypes[itemIndex]; }
public ItemsType selectByPk1(String copId) { ItemsType cop1 = new ItemsType(); DataTable dt = new DataTable(); String sql = "select expC.* " + "From " + itmT.table + " expC " + //"Left Join t_ssdata_visit ssv On ssv.ssdata_visit_id = bd.ssdata_visit_id " + "Where expC." + itmT.pkField + " ='" + copId + "' "; dt = conn.selectData(conn.conn, sql); cop1 = setItemsType(dt); return(cop1); }
public String insertItemsType(ItemsType p, String userId) { String re = ""; if (p.item_type_id.Equals("")) { re = insert(p, userId); } else { re = update(p, userId); } return(re); }
// Use this for initialization void Start() { if (type == ElementType.food || type == ElementType.item) { index = ResourcesManager.instance.GetItemIndex(ID); ItemsType f = ResourcesManager.instance.itemsPool [index.first] [index.second]; if (f.fadingtime > 0) { Completed.GameManager.instance.AddItemToFaing(this, f.fadingtime); } } else { index = ResourcesManager.instance.GetStoriesIndex(ID); } }
public void MakeIssueGraph_UseManualOperationsTest() { using (var uow = UnitOfWorkFactory.CreateWithoutRoot()) { var nomenclatureType = new ItemsType(); nomenclatureType.Name = "Тестовый тип номенклатуры"; uow.Save(nomenclatureType); var nomenclature = new Nomenclature(); nomenclature.Type = nomenclatureType; uow.Save(nomenclature); var protectionTools = new ProtectionTools(); protectionTools.Name = "СИЗ для тестирования"; protectionTools.AddNomeclature(nomenclature); uow.Save(protectionTools); var employee = new EmployeeCard(); uow.Save(employee); //Операция без номеклатуры var manualOp = new EmployeeIssueOperation(); manualOp.OperationTime = new DateTime(2019, 1, 1, 14, 0, 0); manualOp.AutoWriteoffDate = new DateTime(2020, 1, 1); manualOp.Employee = employee; manualOp.ProtectionTools = protectionTools; manualOp.Issued = 1; manualOp.OverrideBefore = true; uow.Save(manualOp); var expenseOp = new EmployeeIssueOperation(); expenseOp.OperationTime = new DateTime(2020, 1, 1, 13, 0, 0); expenseOp.AutoWriteoffDate = new DateTime(2021, 1, 1); expenseOp.Employee = employee; expenseOp.Nomenclature = nomenclature; expenseOp.ProtectionTools = protectionTools; expenseOp.Issued = 1; uow.Save(expenseOp); uow.Commit(); var graph = IssueGraph.MakeIssueGraph(uow, employee, protectionTools); Assert.That(graph.Intervals.Count, Is.EqualTo(3)); var first = graph.OrderedIntervals.First(); Assert.That(first.StartDate, Is.EqualTo(new DateTime(2019, 1, 1))); } }
public void getlExpnT() { //lDept = new List<Department>(); DataTable dt = new DataTable(); dt = selectAll(); foreach (DataRow row in dt.Rows) { ItemsType curr1 = new ItemsType(); curr1.item_type_id = row[itmT.item_type_id].ToString(); curr1.item_type_code = row[itmT.item_type_code].ToString(); curr1.item_type_name_e = row[itmT.item_type_name_e].ToString(); curr1.item_type_name_t = row[itmT.item_type_name_t].ToString(); lExpnT.Add(curr1); } }
private void BtnCashOk_Click(object sender, EventArgs e) { //throw new NotImplementedException(); grfBill.Clear(); grfBill.Rows.Count = 1; grfBill.Cols[colBItmNameT].Width = 220; grfBill.Cols[colBExpn].Width = 100; grfBill.Cols[colBimcome].Width = 100; //grfBill.Cols[colCDrawDate].Width = 100; //grfBill.Cols[colCAmt].Width = 100; grfBill.Cols[colBItmNameT].Caption = "รายการ"; grfBill.Cols[colBExpn].Caption = "ค่าใช้จ่าย"; grfBill.Cols[colBimcome].Caption = "รายได้"; grfBill.Cols[colBID].Visible = false; foreach (Row rowD in grfDraw.Rows) { if (rowD[colCChk] == null) { continue; } if ((Boolean)rowD[colCChk]) { String ddid = ""; ExpensesDrawDatail expndd = new ExpensesDrawDatail(); Items itm = new Items(); ItemsType itmt = new ItemsType(); ItemsTypeSub itmts = new ItemsTypeSub(); ddid = rowD[colCID].ToString(); expndd = xC.accDB.expnddDB.selectByPk1(ddid); itm = xC.iniDB.itmDB.selectByPk1(expndd.item_id); if (itm.item_group_id.Equals("")) { itmts = xC.iniDB.itmtsDB.selectByPk1(itm.item_type_sub_id); itmt = xC.iniDB.itmtDB.selectByPk1(itmts.item_type_id); itm.item_group_id = itmt.item_group_id; } itm.item_name_t = rowD[colCItmNameT].ToString(); itm.amt = rowD[colCAmt].ToString(); itm.cust_id = expndd.expenses_draw_detail_id; //ฝาก setRowGrfBill(itm); } } calAmtGrfBill(); tC2.SelectedTab = tabBill; }
private void chkNull(ItemsType p) { int chk = 0; Decimal chk1 = 0; p.date_modi = p.date_modi == null ? "" : p.date_modi; p.date_cancel = p.date_cancel == null ? "" : p.date_cancel; p.user_create = p.user_create == null ? "" : p.user_create; p.user_modi = p.user_modi == null ? "" : p.user_modi; p.user_cancel = p.user_cancel == null ? "" : p.user_cancel; p.item_type_code = p.item_type_code == null ? "" : p.item_type_code; p.item_type_name_e = p.item_type_name_e == null ? "" : p.item_type_name_e; p.item_type_name_t = p.item_type_name_t == null ? "" : p.item_type_name_t; p.remark = p.remark == null ? "" : p.remark; p.sort1 = p.sort1 == null ? "" : p.sort1; p.item_group_id = p.item_group_id == null ? "0" : p.item_group_id; }
public void PickupItems( GameObject _jewel ) { if ( _jewelItemsList.ContainsKey( _jewel.tag )) { ItemsType _item = _jewelItemsList[ _jewel.tag ] ; _item.Count ++ ; _jewelItemsList.Remove( _jewel.tag ) ; _jewelItemsList.Add ( _jewel.tag,_item ) ; } else { ItemsType _item =new ItemsType(); _item.Count = 1; _jewelItemsList.Add( _jewel.tag,_item) ; } print ( " _jewelItemsList = " + _jewelItemsList.Count ); }
public ItemsObject(ItemsType type, ItemsObject items) { this.Type = type; this.Items = items; }
private bool IsItemButtonEnabled(Guid itemId, ItemsType itemType) { bool isEnabled = true; foreach (GoodsCronTrigger trigger in ConstantValuePool.GoodsCronTriggerList) { if (itemId == trigger.ItemID && (int)itemType == trigger.ItemType) { isEnabled = IsValidDate(trigger.BeginDate, trigger.EndDate, trigger.Week, trigger.Day, trigger.Hour, trigger.Minute); break; } } return isEnabled; }