private void button2_Click(object sender, EventArgs e) { changingID = -1; changingCompany = null; button1.Text = "přidat"; textBox1.Text = ""; }
public void Add(String Name, float Price, float Amount, Company Company, int InvoiceNumber, Unit Unit, MaterialType MaterialType, Month Month, int Year, Currency Currency, DateTime ShippingDate, DateTime CourseDate, float Course, float Shipping, Deadline Deadline) { //String courseDateString = String.Format("{0:0000}-{1:00}-{2:00}",CourseDate.Year,CourseDate.Month,CourseDate.Day).Replace(" ",""); String queryString = String.Format("INSERT INTO `{0}` VALUES(default,'{1}',{2},{3},{4},{5},{6},{7},{8},{9},{10},'{11}','{12}',{13},{14},{15});", _table, Name.Replace("'", "''"), Price.ToString().Replace(',', '.'), Amount.ToString().Replace(',', '.'), Company.ID, InvoiceNumber, Unit.ID, MaterialType.ID, Month.ID, Year, Currency.ID, DateTimeUtils.DateTimeToSQLDate(ShippingDate), DateTimeUtils.DateTimeToSQLDate(CourseDate), Course.ToString().Replace(',', '.'), Shipping.ToString().Replace(',', '.'), Deadline.ID); _SQL.RunQuery(queryString); }
public InventoryMaterialRow(float price, float amount, Unit unit, Company company, MaterialType materialType, Currency currency, float course) { Price = price; Amount = amount; Unit = unit; Company = company; MaterialType = materialType; Currency = currency; Course = course; }
public DeadlineTransferRow(int idMaterlial, int idTransfer, MaterialType materialType, float amount, Unit unit, float price, Company company, DateTime courseDate, float course, Currency currency) { IDMaterial = idMaterlial; IDTransfer = idTransfer; MaterialType = materialType; Amount = amount; Unit = unit; Price = price; Company = company; CourseDate = courseDate; Course = course; Currency = currency; }
public Transfer(int id, Deadline deadline, MaterialType materialType, Company company, float amount, Unit unit, float price, Currency currency, DateTime courseDate, float course) { ID = id; Deadline = deadline; MaterialType = materialType; Company = company; Amount = amount; Unit = unit; Price = price; Currency = currency; CourseDate = courseDate; Course = course; }
private void button1_Click(object sender, EventArgs e) { if (!Auth.HasAccess(AppSettings.User, this.Name, "AddItem")) return; if (textBox1.Text != "") { if (changingID != -1) { changingCompany.Name = textBox1.Text; companies.Change(changingCompany); changingID = -1; changingCompany = null; button1.Text = "přidat"; } else companies.Add(textBox1.Text); textBox1.Text = ""; } refreshData(); }
public Material(int id, String name, float price, float amount, Company company, int invoiceNumber, Unit unit, MaterialType materialType, Month month, int year, Currency currency, DateTime shippingDate, DateTime courseDate, float course, float shipping, Deadline deadline) { ID = id; Name = name; Price = price; Amount = amount; Company = company; InvoiceNumber = invoiceNumber; Unit = unit; MaterialType = materialType; Month = month; Year = year; Currency = currency; ShippingDate = shippingDate; CourseDate = courseDate; Course = course; ShippingPrice = shipping; Deadline = deadline; }
public void Change(Company company) { _SQL.RunQuery(String.Format("UPDATE `{0}` SET NAME='{1}' WHERE ID={2};", _table, company.Name.Replace("'", "''"), company.ID)); }
private void listBox1_DoubleClick(object sender, EventArgs e) { if (!Auth.HasAccess(AppSettings.User, this.Name, "EditItem")) return; if (listBox1.SelectedIndex > -1) { textBox1.Text = ((Company)(listBox1.Items[listBox1.SelectedIndex])).Name.ToString(); changingID = ((Company)(listBox1.Items[listBox1.SelectedIndex])).ID; changingCompany = ((Company)(listBox1.Items[listBox1.SelectedIndex])); button1.Text = "uložit"; } }
public void Add(Deadline Deadline, MaterialType MaterialType, Company Company, float Amount, Unit Unit, float Price, Currency Currency, DateTime CourseDate, float Course) { _SQL.RunQuery(String.Format("INSERT INTO `{0}` VALUES(default,{1},{2},{3},{4},{5},{6},{7},'{8}',{9});", _table, Deadline.ID, MaterialType.ID, Company.ID, Amount.ToString().Replace(',', '.'), Unit.ID, Price.ToString().Replace(',', '.'), Currency.ID, DateTimeUtils.DateTimeToSQLDate(CourseDate), Course.ToString().Replace(',', '.'))); }
public NullTransfer(int id = 0, Deadline deadline = null, MaterialType materialType = null, Company company = null, float amount = 0, Unit unit = null, float price = 0, Currency currency = null, DateTime courseDate = new DateTime(), float course = 0) : base(id, deadline, materialType, company, amount, unit, price, currency, courseDate, course) { }