コード例 #1
0
ファイル: UnitForm.cs プロジェクト: tousekdominik/SkSys
 private void button2_Click(object sender, EventArgs e)
 {
     changingID = -1;
     changingItem= null;
     button1.Text = "přidat";
     textBox1.Text = "";
 }
コード例 #2
0
ファイル: Materials.cs プロジェクト: tousekdominik/SkSys
 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);
 }
コード例 #3
0
ファイル: Composition.cs プロジェクト: tousekdominik/SkSys
 public Composition(int id, Product product, MaterialType materialType, float amount, Unit unit)
 {
     ID = id;
     Product = product;
     MaterialType = materialType;
     Amount = amount;
     Unit = unit;
 }
コード例 #4
0
 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;
 }
コード例 #5
0
ファイル: ProductExport.cs プロジェクト: tousekdominik/SkSys
 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;
 }
コード例 #6
0
 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;
 }
コード例 #7
0
ファイル: Transfer.cs プロジェクト: tousekdominik/SkSys
 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;
 }
コード例 #8
0
ファイル: UnitForm.cs プロジェクト: tousekdominik/SkSys
 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();
 }
コード例 #9
0
ファイル: Material.cs プロジェクト: tousekdominik/SkSys
 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;
 }
コード例 #10
0
ファイル: UnitForm.cs プロジェクト: tousekdominik/SkSys
 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";
     }
 }
コード例 #11
0
 public MaterialUnitPair(MaterialType m, Unit u)
 {
     MaterialType = m;
     Unit = u;
 }
コード例 #12
0
ファイル: Units.cs プロジェクト: tousekdominik/SkSys
 public void Change(Unit unit)
 {
     _SQL.RunQuery(String.Format("UPDATE `{0}` SET NAME='{1}' WHERE ID={2};", _table, unit.Name.Replace("'", "''"), unit.ID));
 }
コード例 #13
0
ファイル: ProductExports.cs プロジェクト: tousekdominik/SkSys
 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));
 }
コード例 #14
0
ファイル: Compositions.cs プロジェクト: tousekdominik/SkSys
 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));
 }
コード例 #15
0
ファイル: Transfer.cs プロジェクト: tousekdominik/SkSys
 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)
 {
 }
コード例 #16
0
ファイル: Transfers.cs プロジェクト: tousekdominik/SkSys
 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(',', '.')));
 }
コード例 #17
0
ファイル: InventoryRow.cs プロジェクト: tousekdominik/SkSys
 public InventoryRow(MaterialType materialType, float amount, Unit unit)
 {
     MaterialType = materialType;
     Amount = amount;
     Unit = unit;
 }