예제 #1
0
 private void Quantity_Type_Load(object sender, EventArgs e)
 {
     dt = Dom_SqlClass.retriveData("Quantity", "", new string[] { "*" });
     DataQty.DataSource = dt;
     dom_Design.GenerateColumHeader(new string[] { "Quantity Type", "Quantity in Package" }, 2, DataQty);
     DataQty.ClearSelection();
 }
예제 #2
0
 private void branch_Load(object sender, EventArgs e)
 {
     dt = Dom_SqlClass.retriveData("Brand", "", new string[] { "*" });
     dataBrand.DataSource = dt;
     dom_Design.GenerateColumHeader(new string[] { "ID", "Brand Name" }, 2, dataBrand);
     ID = Dom_SqlClass.GetIDFromDB("BrandID", "Brand");
     Clear();
 }
예제 #3
0
 private void category_Load(object sender, EventArgs e)
 {
     dt = Dom_SqlClass.retriveData("Category", "", new string[] { "*" });
     dataCat.DataSource = dt;
     dom_Design.GenerateColumHeader(new string[] { "ID", "Category Name" }, 2, dataCat);
     ID = Dom_SqlClass.GetIDFromDB("CatID", "Category");
     Clear();
 }
예제 #4
0
 private void button5_Click(object sender, EventArgs e)
 {
     if (update == true)
     {
         Dom_SqlClass.UpdateDate(dt);
         update = false;
     }
 }
예제 #5
0
 private void supplyer_Load(object sender, EventArgs e)
 {
     dt = Dom_SqlClass.retriveData("Supplier", "", new string[] { "*" });
     datasupplier.DataSource = dt;
     dom_Design.GenerateColumHeader(new string[] { "ID", "Supplier Name", "Phone", "Email", "Address" }, 5, datasupplier);
     dom_Design.ColumnName(datasupplier, 5, new string[] { "ID", "SupName", "Tel", "Email", "Address" });
     ID = Dom_SqlClass.GetIDFromDB("SupID", "_", "Supplier");
     ID = dom_Design.GenerateID(ID, "SP00_");
     Clear();
 }
예제 #6
0
 private void category_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (update == true)
     {
         DialogResult dir = MessageBox.Show("Do you wnat to save all your data?", "Your Data doesn't saved ! ", MessageBoxButtons.YesNo);
         if (dir == DialogResult.Yes)
         {
             Dom_SqlClass.UpdateDate(dt);
         }
     }
 }
예제 #7
0
        private void LogIN_Load(object sender, EventArgs e)
        {
            dataCon.getRateAndDaysAlmostExp();

            dt = Dom_SqlClass.retriveData("Employee join UserAcc on Employee.EmpID=UserAcc.EmpID", "", new string[] { "*" });

            string        fileDir = AppDomain.CurrentDomain.BaseDirectory + @"Image\Product\";
            DirectoryInfo di      = Directory.CreateDirectory(fileDir);

            dataCon.getRateAndDaysAlmostExp();
        }
예제 #8
0
 private void Import_Load(object sender, EventArgs e)
 {
     DTProduct = Dom_SqlClass.retriveDataMultiTable(@"Select p.ProID,p.ProName from Product p;");
     ReadDatafromDataTable(cmProductName, DTProduct, DataProName);
     DTSupllier = Dom_SqlClass.retriveDataMultiTable(@"Select s.SupID,s.SupName from Supplier s;");
     ReadDatafromDataTable(cmSupllierName, DTSupllier, DataSupName);
     txtEmpl.Text          = UserLoginDetail.fName + " " + UserLoginDetail.lName;
     DTAllData             = Dom_SqlClass.retriveDataMultiTable(@"Select i.ImportID as 'Import ID',i.ImportDate as 'Import Date',CONCAT(e.Fname,e.Lname) as 'Employee Name',s.SupName as 'Suppllier Name', p.ProName as 'Product Name',id.Qty as 'Quality',id.UnitPrice,id.SubTotal,i.Total from Import i join ImportDetail id on i.ImportID=id.ImportID join Supplier s on i.SupID=s.SupID join Employee e on i.ImportID=e.EmpID join Product p on id.ProID=p.ProID;");
     dataImport.DataSource = DTAllData;
     ID         = Dom_SqlClass.GetIDFromDB("ImportID", "_", "Import");
     ID         = dom_Design.GenerateID(ID, "I00_");
     LblID.Text = ID;
 }
예제 #9
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     Dom_SqlClass.UpdateDate(dt);
 }
예제 #10
0
 private void LogIN_Load(object sender, EventArgs e)
 {
     dt = Dom_SqlClass.retriveData("Employee join UserAcc on Employee.EmpID=UserAcc.EmpID", "", new string[] { "*" });
 }
예제 #11
0
 private void QuantityImportType_Load(object sender, EventArgs e)
 {
     DT = Dom_SqlClass.retriveData("Quantity", "where 1=1", new string[] { "*" });
     ReadDatafromDataTable(comboBox1, DT, Data);
 }