Example #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     changingID = -1;
     changingItem= null;
     button1.Text = "přidat";
     textBox1.Text = "";
 }
Example #2
0
 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);
 }
Example #3
0
 public Composition(int id, Product product, MaterialType materialType, float amount, Unit unit)
 {
     ID = id;
     Product = product;
     MaterialType = materialType;
     Amount = amount;
     Unit = unit;
 }
 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;
 }
Example #5
0
 public ProductExport(int id, Product product, float amount, Unit unit, String description, Month month, int year, Deadline deadline)
 {
     ID = id;
     Product = product;
     Amount = amount;
     Unit = unit;
     Description = description;
     Month = month;
     Year = year;
     Deadline = deadline;
 }
 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;
 }
Example #7
0
 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;
 }
Example #8
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (!Auth.HasAccess(AppSettings.User, this.Name, "AddItem"))
         return;
     if (textBox1.Text != "")
     {
         if (changingID != -1)
         {
             changingItem.Name = textBox1.Text;
             items.Change(changingItem);
             changingID = -1;
             changingItem = null;
         }
         else
             items.Add(textBox1.Text);
         textBox1.Text = "";
     }
     refreshData();
 }
Example #9
0
 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;
 }
Example #10
0
 private void listBox1_DoubleClick(object sender, EventArgs e)
 {
     if (!Auth.HasAccess(AppSettings.User, this.Name, "EditItem"))
         return;
     if (listBox1.SelectedIndex > -1) {
         textBox1.Text = ((Unit)(listBox1.Items[listBox1.SelectedIndex])).Name.ToString();
         changingID = ((Unit)(listBox1.Items[listBox1.SelectedIndex])).ID;
         changingItem = ((Unit)(listBox1.Items[listBox1.SelectedIndex]));
         button1.Text = "uložit";
     }
 }
 public MaterialUnitPair(MaterialType m, Unit u)
 {
     MaterialType = m;
     Unit = u;
 }
Example #12
0
 public void Change(Unit unit)
 {
     _SQL.RunQuery(String.Format("UPDATE `{0}` SET NAME='{1}' WHERE ID={2};", _table, unit.Name.Replace("'", "''"), unit.ID));
 }
Example #13
0
 public void Add(Product Product, float Amount, Unit Unit, String Description, Month Month, int Year, Deadline Deadline)
 {
     _SQL.RunQuery(String.Format("INSERT INTO `{0}` VALUES(default,{1},{2},{3},'{4}',{5},{6},{7});",
         _table, Product.ID, Amount, Unit.ID, Description.Replace("'", "''"), Month.ID, Year, Deadline.ID));
 }
Example #14
0
 public void Add(Product Product, MaterialType MaterialType, float Amount, Unit Unit)
 {
     _SQL.RunQuery(String.Format("INSERT INTO `{0}` VALUES(default,{1},{2},{3},{4});",
         _table, Product.ID, MaterialType.ID, Amount.ToString().Replace(',', '.'), Unit.ID));
 }
Example #15
0
 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)
 {
 }
Example #16
0
 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(',', '.')));
 }
Example #17
0
 public InventoryRow(MaterialType materialType, float amount, Unit unit)
 {
     MaterialType = materialType;
     Amount = amount;
     Unit = unit;
 }