public bool EditParty(party oParty) { try { party ptParty = _entities.parties.Find((oParty.party_id)); ptParty.party_name = oParty.party_name; ptParty.parent_party_id = ptParty.parent_party_id; ptParty.party_code = ptParty.party_code; ptParty.address = oParty.address; ptParty.proprietor_name = oParty.proprietor_name; ptParty.phone = oParty.phone; ptParty.mobile = oParty.mobile; ptParty.email = oParty.email; ptParty.area_id = oParty.area_id; ptParty.party_type_id = oParty.party_type_id; ptParty.credit_limit = oParty.credit_limit; ptParty.start_date = oParty.start_date; ptParty.is_active = oParty.is_active; ptParty.is_deleted = false; ptParty.country_id = oParty.country_id; ptParty.province_id = oParty.province_id; ptParty.city_id = oParty.city_id; ptParty.region_id = oParty.region_id; ptParty.territory_id = oParty.territory_id; ptParty.credit_limit = oParty.credit_limit; ptParty.updated_by = oParty.updated_by; ptParty.updated_date = DateTime.Now; ptParty.dealer_type_id = oParty.dealer_type_id; ptParty.retailer_type_id = oParty.retailer_type_id; _entities.SaveChanges(); ////Update Warehouse for Related Party var kkk = _entities.warehouses.SingleOrDefault(p => p.party_id == oParty.party_id).warehouse_id; warehouse update_warehouse = new warehouse { warehouse_id = kkk, warehouse_name = oParty.party_name + " Warehouse", warehouse_address = oParty.address, warehouse_type = "Physical", party_id = oParty.party_id, party_type_id = oParty.party_type_id, region_id = oParty.region_id, area_id = oParty.area_id, territory_id = oParty.territory_id, is_active = true, is_deleted = false, updated_by = oParty.updated_by, created_date = DateTime.Now }; //Update warehouse whr.EditWarehouse(update_warehouse); _entities.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public long DeleteParty(long party_id, long?updated_by) { try { var deletepartys = _entities.requisition_master.Where(rm => rm.party_id == party_id).ToList(); if (deletepartys.Count != 0) { return(1); } else { party oParty = _entities.parties.FirstOrDefault(p => p.party_id == party_id); oParty.is_deleted = true; oParty.updated_by = updated_by; oParty.updated_date = DateTime.Now; _entities.SaveChanges(); var kkk = _entities.warehouses.SingleOrDefault(p => p.party_id == party_id).warehouse_id; whr.DeleteWarehouse(kkk, updated_by); return(2); } } catch (Exception) { return(0); } return(0); }
public void RemoveTask(party myTask) { var procedure = "[deleteFromParty]"; var values = new { description = myTask.description }; conn.Query(procedure, values, commandType: CommandType.StoredProcedure); }
static void Main(string[] args) { List <party> partySession = new List <party>(); bool endSession = false; Console.WriteLine("Welcome to our self serve guest list!"); Console.WriteLine("Please follow the prompts below to ensure the best check in experience"); while (endSession == false) { party guest = new party(); guest.guestName = GetName(); guest.partySize = GetPartyCount(); partySession.Add(guest); Console.WriteLine("Would you like to add another Guest? Yes or No?"); string answer = Console.ReadLine(); if (answer.ToLower() == "no") { endSession = true; } int count = 0; foreach (var item in partySession) { count += item.partySize; Console.Write($"{item.guestName} "); } Console.WriteLine($"\nThe total number of guests is {count}"); } }
public void CompleteTask(party myTask) { var procedure = "[toggle]"; var values = new { description = myTask.description }; conn.Query(procedure, values, commandType: CommandType.StoredProcedure); }
/* * this script stores a trainer in an object in the map. So you can Identify which puppet is which trainer */ private void Start() //checks if this trainer has been beaten. { Party = GameObject.FindObjectOfType <party>(); if (Party.trainersDefeated.Contains(trainer)) { hasBeenBeaten = true; } }
private void I_edit(party party) { var viwer = new Party.party_viwer(); viwer.id = party.id; viwer.partyname = party.name; viwer.addre = party.address; viwer.pan = party.pannumber; }
public void removeTask(string description) { party removeEvent = new party() { description = description, done = false }; DAL.RemoveTask(removeEvent); }
public bool EditCreditLimit(party CreditLimit) { var partyCreditLimit = _entities.parties.Find(CreditLimit.party_id); partyCreditLimit.credit_limit = CreditLimit.credit_limit; _entities.SaveChanges(); return(true); }
/* * this script is responsible for the opening of the inventory on the click of the inventory button in mobile mode, * or the TAB button in desktop / macOS mode. It is also used to store the position before switching scenes to * make sure that the player doesnt teleport after the fight. */ private void Start() { Party = GameObject.FindObjectOfType <party>().GetComponent <party>(); if (Party.usePlayerPosOnLoad) { player.position = Party.playerPosInMap; movePoint.position = Party.playerPosInMap; } }
// GET: Party/Delete/5 public ActionResult Delete(int id) { party p1 = new party() { id = id }; p1.delete(); return(RedirectToAction("Index")); }
/* * dit is verreweg het grootste script uit project pokemon. Het handelt de battlescene, de meest complexe scene bijna helemaal * alleen. Hij is verantwoordelijk voor alle UI (daarom staan hierboven heel veel texts en images), hij is verantwoordelijk voor * het berekenen van de damage en het kijken of de pokemon al dood is, en het is verantwoordelijk voor het bijhouden van de * tegenstanders variabelen. */ void Start() { //toevoegen van de pokemonparty pokemonparty = (GameObject.FindWithTag("party").GetComponent <party>() as party); // als of fight, dan fight - hide en long moves - show. //fightbutton - als je klikt gaat figntbuttonfunction aan. FightButton.onClick.AddListener(Fightbuttonfunction); //longmoves (panel) staat uit. longmoves.changeVisibility(false); //backbutton - als je klikt gaat backbutotnfunction aan. //zorg dat de goede functies worden uitgevoerd op een buttonpress backbutton.onClick.AddListener(Backbuttonfunction); BagButton.onClick.AddListener(bag); PokemonButton.onClick.AddListener(pokemonButtonFunction); pokSlcBack.onClick.AddListener(pokSlcBackBtnFunction); initiateMoveButtons(); //als je naar inventory gaat worden alle variabelen hierin verwijderd, in party niet. //dus daarom kijken wij of we het gevecht niet opnieuw moeten oppakken if (pokemonparty.inBattle) { //resuming the battle enemyHps = pokemonparty.EnemyHps; enemyPokIndex = pokemonparty.enemyPokemonIndex; enemypok = pokemonparty.trainer.pokemons[enemyPokIndex]; ourpokIndex = pokemonparty.currentPokemonIndex; ourpok = pokemonparty.pokemons[ourpokIndex]; } else { //making a new battle pokemonparty.inBattle = true; //zorg dat party weet dat wij in battle zijn ourpok = pokemonparty.pokemons[0]; ourpokIndex = 0; enemypok = pokemonparty.trainer.pokemons[0]; enemyPokIndex = 0; //zorg dat wij de hp lijst van de tegenstander volle hps heeft foreach (Pokemon pokemon in pokemonparty.trainer.pokemons) { enemyHps.Add(pokemon.HP); } pokemonparty.resetMusic(); //update de muziek } Eventtekst.text = "What will " + ourpok.name + " do?"; //aanroepen van updateUI updateUI(); checkForFaint(); }
public void Insert(string name) { //Put together LINQ statement and INSERT into the database party p = new party { party_name = name, }; _dc.parties.InsertOnSubmit(p); _dc.SubmitChanges(); }
void Start() { Party = (GameObject.FindGameObjectWithTag("party").GetComponent("party") as party); //gets party foreach (Pokemon pokemon in Party.pokemons) { targetFinders.Add(Instantiate(targetFinderPrefab, transform).GetComponent("targetFinder") as targetFinder); //makes a copy of the prefab, //and makes this object the parent. Also gets the component of this prefab and puts it in the list targetFinders[count].setPokemon(pokemon, Party.HPs[count], count); //give the targetfinder the pokemon count = count + 1; } ShowHide.initiate(); //lets the showhide check out the new list }
public ActionResult Edit([Form] party p1) { try { // TODO: Add update logic here p1.Update(); return(RedirectToAction("Index")); } catch { return(RedirectToAction("Index")); } }
private void materialButton1_update_Click(object sender, EventArgs e) { if (betterTextBox1_name.Text.Trim() == "") { CustomControls.Alert.show(" Name", "Enter Party Name ", 1500); } if (betterTextBox1_address.Text.Trim() == "") { CustomControls.Alert.show("Address", "Enter Party Address", 1500); } if (betterTextBox2_phone.Text.Trim() == "") { CustomControls.Alert.show("Phone", "Enter Party Phone", 1500); } if (betterTextBox11_panNumber.Text.Trim() == "") { CustomControls.Alert.show("Pan Number", "Enter Pan Number", 1500); } if (betterTextBox10_postalcode.Text.Trim() == "") { CustomControls.Alert.show("Postal Code", "Enter Postal Code", 1500); } if (betterTextBox12_deu.Text.Trim() == "") { CustomControls.Alert.show("Deu", "Enter Deu ", 1500); } if (betterTextBox13_advance.Text.Trim() == "") { CustomControls.Alert.show("Advance", "Enter Advance", 1500); } if (betterTextBox3_email.Text.Trim() == "") { CustomControls.Alert.show("Email", "Enter Email", 1500); } using (var db = new ResturantManagementEntities()) { party ptr = db.parties.Where(o => o.id == id).First(); ptr.name = betterTextBox1_name.Text; ptr.address = betterTextBox1_address.Text; ptr.phone = betterTextBox2_phone.Text; ptr.pannumber = betterTextBox11_panNumber.Text; ptr.postalcode = betterTextBox10_postalcode.Text; ptr.email = betterTextBox3_email.Text; ptr.due = Convert.ToDecimal(betterTextBox12_deu.Text); ptr.advance = Convert.ToDecimal(betterTextBox13_advance.Text); db.Entry(ptr).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); } }
void Start() { Party = (GameObject.FindGameObjectWithTag("party").GetComponent("party") as party); Items = Party.items; amounts = Party.itemAmounts; count = 0; foreach (Item item in Items) { itemObjects.Add((Instantiate(itemPrefab, gameObject.transform).GetComponent("itemDisplayer") as itemDisplayer)); //makes a copy of the prefab for each item and make it a child of this object, and stores it in the list. itemObjects[count].setItem(item, amounts[count]); //makes sure the amount is displayed and the prefab knows which item it holds count = count + 1; } }
public void loaddata(int id) { using (var db = new Model.ResturantManagementEntities()) { party prt = db.parties.Where(o => o.id == id).First(); betterTextBox1_name.Text = prt.name; betterTextBox1_address.Text = prt.address; betterTextBox2_phone.Text = prt.phone; betterTextBox3_email.Text = prt.email; betterTextBox10_postalcode.Text = prt.postalcode; betterTextBox11_panNumber.Text = prt.pannumber; betterTextBox12_deu.Text = prt.due.ToString(); betterTextBox13_advance.Text = prt.advance.ToString(); this.id = id; } }
public ActionResult Create([Form] party p1) { try { if (ModelState.IsValid) { p1.Create(); } else { return(View("Index", p1)); } return(RedirectToAction("Index")); } catch { return(View("Index", p1)); } }
public long AddParty(party oParty) { try { long partyCode = _entities.parties.Max(po => (long?)po.party_id) ?? 0; if (partyCode != 0) { partyCode++; } else { partyCode++; } var cusString = partyCode.ToString().PadLeft(7, '0'); var getPartytype = _entities.party_type.Find(oParty.party_type_id); string partyPrefix = getPartytype.party_prefix; string cusCodeNo = partyPrefix + "-" + cusString; party insert_party = new party { party_code = cusCodeNo, parent_party_id = oParty.parent_party_id, party_name = oParty.party_name, address = oParty.address, proprietor_name = oParty.proprietor_name, phone = oParty.phone, mobile = oParty.mobile, email = oParty.email, party_type_id = oParty.party_type_id, start_date = oParty.start_date, is_active = true, is_deleted = false, country_id = oParty.country_id, province_id = oParty.province_id, city_id = oParty.city_id, region_id = oParty.region_id, area_id = oParty.area_id, territory_id = oParty.territory_id, credit_limit = oParty.credit_limit, created_by = oParty.created_by, created_date = DateTime.Now, dealer_type_id = oParty.dealer_type_id, retailer_type_id = oParty.retailer_type_id }; _entities.parties.Add((insert_party)); _entities.SaveChanges(); long last_insert_id = insert_party.party_id; //backend warehouse creation.......... //---------------------- //generate warehouse Code long WarehouseSerial = _entities.warehouses.Max(rq => (long?)rq.warehouse_id) ?? 0; if (WarehouseSerial != 0) { WarehouseSerial++; } else { WarehouseSerial++; } var whStr = WarehouseSerial.ToString().PadLeft(7, '0'); string wareHouseCode = "WH-" + whStr; // Create Warehouse for New Party warehouse insert_warehouse = new warehouse { warehouse_name = oParty.party_name + " Warehouse", warehouse_code = wareHouseCode, warehouse_address = oParty.address, warehouse_type = "Physical", party_id = last_insert_id, party_type_id = oParty.party_type_id, created_by = oParty.created_by, region_id = oParty.region_id, area_id = oParty.area_id, territory_id = oParty.territory_id, is_active = true, is_deleted = false, created_date = DateTime.Now }; _entities.warehouses.Add(insert_warehouse); _entities.SaveChanges(); return(last_insert_id); } catch (Exception) { return(0); } }
public void AddTask(party myTask) { conn.Insert <party>(myTask); }
public void addTask(party newEvent) { DAL.AddTask(newEvent); }
private void I_adddata(party party) { add(party); }
public void toggle(party desc) { DAL.CompleteTask(desc); }
public void addTask(party newEvent) { //party myTask = new party() { description = "TEST DESCRIPTION", done = false }; DAL.AddTask(newEvent); }
public static async Task Main(string[] args) { try { Console.WriteLine(); CosmoDBRepository <Event> cosmoDBRepository = new CosmoDBLibrary.CosmoDBRepository <Event>(); Event eve = new Event { Id = "ven.1", Name = "ven", Description = "event client" }; await cosmoDBRepository.AddItemsToContainerAsync(eve, "ven"); Console.WriteLine("Beginning operations Update Item ...\n"); await cosmoDBRepository.UpdateItemAsync(eve.Name, eve.Id); Console.WriteLine("Beginning operations Read Items ...\n"); List <Event> events = await cosmoDBRepository.ReadItemsAsync("ven"); foreach (Event eves in events) { Console.WriteLine("\tRead {0}\n", eves); } Console.WriteLine("Beginning operations Delete Item ...\n"); await cosmoDBRepository.DeleteItemAsync(eve.Name, eve.Id); CosmoDBRepository <party> cosmoDBRepository_party = new CosmoDBLibrary.CosmoDBRepository <party>(); party party = new party { Id = "party.1", Name = "party", Description = "party client", count = 1 }; Console.WriteLine("party AddItems To Container Async operations...\n"); await cosmoDBRepository_party.AddItemsToContainerAsync(party, party.Name); Console.WriteLine("party Beginning operations Update Item ...\n"); await cosmoDBRepository_party.UpdateItemAsync(party.Name, party.Id); Console.WriteLine("party Beginning operations Read Items ...\n"); List <party> partys = await cosmoDBRepository_party.ReadItemsAsync(party.Name); foreach (party part in partys) { Console.WriteLine("\tRead {0}\n", part); } Console.WriteLine("Beginning operations Delete Item ...\n"); await cosmoDBRepository_party.DeleteItemAsync(party.Name, party.Id); #region cosmoDB without generic code //Console.WriteLine("Beginning operations...\n"); //CosmoDBDriver cosmoDBDriver = new CosmoDBDriver(); //Event eve = new Event //{ // Id = "ven.1", // Name = "ven", // Description = "event client" //}; //Console.WriteLine("AddItems To Container Async operations...\n"); //await cosmoDBDriver.AddItemsToContainerAsync(eve); //Console.WriteLine("Beginning operations Update Item ...\n"); //await cosmoDBDriver.UpdateItemAsync("Diyan", "Diyan.1"); //Console.WriteLine("Beginning operations Read Items ...\n"); //List<Event> events = await cosmoDBDriver.ReadItemsAsync("ven"); //foreach (Event eves in events) //{ // Console.WriteLine("\tRead {0}\n", eves); //} //Console.WriteLine("Beginning operations Read Items ...\n"); //List<Event> events1 = await cosmoDBDriver.ReadItemsAsync("Diyan"); //foreach (Event eves in events1) //{ // Console.WriteLine("\tRead {0}\n", eves); //} // Console.WriteLine("Beginning operations Delete Item ...\n"); // await cosmoDBDriver.DeleteItemAsync("Diyan", "Diyan.1"); //Console.WriteLine("Beginning operations DeleteDatabase And Cleanup ...\n"); //await cosmoDBDriver.DeleteDatabaseAndCleanupAsync(); #endregion } catch (Exception e) { Console.WriteLine("Error: {0}", e); } finally { Console.WriteLine("End of demo, press any key to exit."); Console.ReadKey(); } }
private void Addparty_FormClosed(object sender, FormClosedEventArgs e) { party obj = new party(); obj.MdiParent = MdiParent; obj.Show(); }
public ReturnModel GetReturnById(long return_master_id) { try { ReturnModel returnModel = new ReturnModel(); returnModel.ReturnMasterData = _entities.return_master.Find(return_master_id); //////////////////////04.03.2017 var party = _entities.requisition_master.Find(return_master_id); Int64 partyId = 0; if (party != null) { partyId = (long)party.party_id; } party ppp = _entities.parties.Find(partyId); //var returnMaster = _entities.return_master.Find(return_master_id); // var returnMaster = _entities.return_master.Where(w => w.return_master_id == return_master_id).ToList(); //foreach (var itm in returnMaster) //{ // returnModel.ReturnMasterData.party_id = itm.party_id??0; //} //returnModel.ReturnMasterData.return_master_id = returnMaster.return_master_id; //returnModel.ReturnMasterData.party_id = returnMaster.party_id; //returnModel.ReturnMasterData.created_by = returnMaster.created_by; //returnModel.ReturnMasterData.created_date = returnMaster.created_date; //returnModel.ReturnMasterData.doa_receive_status = returnMaster.doa_receive_status; //returnModel.ReturnMasterData.doa_receive_date = returnMaster.doa_receive_date; //returnModel.ReturnMasterData.doa_received_by = returnMaster.doa_received_by; //returnModel.ReturnMasterData.doa_verified_date = returnMaster.doa_verified_date; //returnModel.ReturnMasterData.doa_varify_status = returnMaster.doa_varify_status; //returnModel.ReturnMasterData.doa_verified_by = returnMaster.doa_verified_by; //returnModel.ReturnMasterData.doa_warehouse_id = returnMaster.doa_warehouse_id; //returnModel.ReturnMasterData.invoice_master_id = returnMaster.invoice_master_id; //returnModel.ReturnMasterData.is_active = returnMaster.is_active; //returnModel.ReturnMasterData.is_deleted = returnMaster.is_deleted; //returnModel.ReturnMasterData.remarks = returnMaster.remarks; //returnModel.ReturnMasterData.updated_date = returnMaster.updated_date; //returnModel.ReturnMasterData.updated_by = returnMaster.updated_by; //returnModel.ReturnMasterData.region_id = ppp.region_id ?? 0; //returnModel.ReturnMasterData.area_id = ppp.area_id ?? 0; //returnModel.ReturnMasterData.area_id = ppp.area_id ?? 0; //returnModel.ReturnMasterData.party_type_id = ppp.party_type_id ?? 0; ///////////////////////04.03.2017 var returns = (from rm in _entities.return_master join rd in _entities.return_details on rm.return_master_id equals rd.return_master_id join pro in _entities.products on rd.product_id equals pro.product_id join c in _entities.colors on rd.color_id equals c.color_id //join v in _entities.product_version on rd.product_version_id equals v.product_version_id //in u in _entities.units on rd.unit_id equals u.unit_id join b in _entities.brands on rd.brand_id equals b.brand_id join rt in _entities.return_type on rm.return_type equals rt.return_type_id join p in _entities.parties on rm.party_id equals p.party_id join pt in _entities.party_type on p.party_type_id equals pt.party_type_id join v in _entities.product_version on rd.product_version_id equals v.product_version_id where (rm.return_master_id == return_master_id)//10.11.2016 select new ReturnDetailsModel() { return_master_id = rm.return_master_id, return_details_id = rd.return_details_id, product_id = rd.product_id, product_name = pro.product_name, party_id = rm.party_id, party_name = p.party_name, party_type_id = p.party_type_id, party_prefix = pt.party_prefix, imei_no = rd.imei_no, imei_no2 = rd.imei_no2, return_type_name = rt.return_type_name, brand_id = rd.brand_id, brand_name = b.brand_name, color_id = rd.color_id, color_name = c.color_name, product_version_id = rd.product_version_id, product_version_name = v.product_version_name, unit_id = rd.unit_id, //unit_name = u.unit_name, price = rd.price, //15.11.2016 invoice_no = rd.invoice_no, invoice_date = rd.invoice_date }).OrderBy(t => t.return_details_id).ToList(); returnModel.ReturnDetailsList = returns; return(returnModel); } catch (Exception) { throw; } }
private void materialButton1_save_Click(object sender, EventArgs e) { if (betterTextBox1_name.Text.Trim() == "") { CustomControls.Alert.show(" Name", "Enter Party Name ", 1500); return; } if (betterTextBox1_address.Text.Trim() == "") { CustomControls.Alert.show("Address", "Enter Party Address", 1500); return; } if (betterTextBox2_phone.Text.Trim() == "") { CustomControls.Alert.show("Phone", "Enter Party Phone", 1500); return; } if (betterTextBox11_panNumber.Text.Trim() == "") { CustomControls.Alert.show("Pan Number", "Enter Pan Number", 1500); return; } try { party i = new party() { name = betterTextBox1_name.Text, address = betterTextBox1_address.Text, phone = betterTextBox2_phone.Text, email = betterTextBox3_email.Text, postalcode = betterTextBox10_postalcode.Text, pannumber = betterTextBox11_panNumber.Text, //advance = betterTextBox13_advance.decVal, //due = betterTextBox12_deu.decVal, created_at = DateTime.Now, updated_at = DateTime.Now }; db.parties.Add(i); db.SaveChanges(); adddata?.Invoke(i); if (betterTextBox12_deu.decVal > 0) { var party_payment = new party_ledgers() { party_id = i.id, date = INFO.currentdate, amount = betterTextBox12_deu.decVal, billnumber = "unknown", returnamount = 0, updated_at = DateTime.Now, created_at = DateTime.Now, type = "CR", }; db.party_ledgers.Add(party_payment); db.SaveChanges(); } else if (betterTextBox13_advance.decVal > 0) { var P_payment = new party_ledgers() { party_id = i.id, date = INFO.currentdate, amount = betterTextBox13_advance.decVal, billnumber = "unknown", returnamount = 0, updated_at = DateTime.Now, created_at = DateTime.Now, type = "DR", }; db.party_ledgers.Add(P_payment); db.SaveChanges(); } this.Close(); } catch (Exception ex) { MessageBox.Show("error"); }; }
/* * this handles the exiting of the inventory */ private void Start() { btn.onClick.AddListener(exitInventory); //set ip the button Party = GameObject.FindGameObjectWithTag("party").GetComponent <party>(); //get the party }