private void TedarikçileriGöster_Activated(object sender, EventArgs e) { Açıklama.ToolTipIcon = ToolTipIcon.Info; Açıklama.IsBalloon = true; if (Ayarlar.tema == "Varsayılan") { this.BackColor = Color.FromArgb(37, 46, 59); } else if (Ayarlar.tema == "Kırmızı") { this.BackColor = Color.Red; } else if (Ayarlar.tema == "Mavi") { this.BackColor = Color.Blue; } else if (Ayarlar.tema == "Yeşil") { this.BackColor = Color.Green; } Açıklama.SetToolTip(txtBoxAdı, "Adı"); Açıklama.SetToolTip(txtBoxSoyadı, "Soyadı"); SupplierTableAdapter.Fill(this.Store_ManagerDataSet.Supplier); raporTedarikçileriGöster.RefreshReport(); txtBoxAdı.Text = "Adı"; txtBoxSoyadı.Text = "Soyadı"; }
private void TedarikçileriGöster_Leave(object sender, EventArgs e) { SupplierTableAdapter.Fill(this.Store_ManagerDataSet.Supplier); raporTedarikçileriGöster.RefreshReport(); txtBoxAdı.Text = "Adı"; txtBoxSoyadı.Text = "Soyadı"; }
/// <summary> /// GetDestinationNotes /// Function of Get Destination Notes /// </summary> /// <param name="destID">Destination ID</param> /// <param name="session">Session object</param> /// <returns>List of Destination Notes</returns> public static List <DAL.SupplierRow> GetSuppliers(ISession session, String VersionNo = "") { try { SupplierTableAdapter ta = new SupplierTableAdapter(); ta.CurrentConnection = session; return(ta.GetData().Select().Cast <DAL.SupplierRow>().ToList()); } catch (Exception ex) { throw; } }
public SupplierDataTable getSuppliers() { SupplierDataTable data; using (SupplierTableAdapter supplierTableAdapter = new SupplierTableAdapter()) { try { data = supplierTableAdapter.GetData(); } catch (Exception exception) { throw new Exception(string.Concat("Could not get suppliers. ", exception.Message)); } } return(data); }
public int getNewCode() { int num1; int num2; int num3; using (SupplierTableAdapter supplierTableAdapter = new SupplierTableAdapter()) { try { int num4 = Convert.ToInt32(supplierTableAdapter.getLastSupplier()); if (num4 == 0) { num3 = 321; } else { if (num4 < 1000) { num1 = num4 % 10; num2 = Convert.ToInt32(num4 / 10); } else { if (num4 < 10000) { num1 = num4 % 100; num2 = Convert.ToInt32(num4 / 100); } else { num1 = num4 % 1000; num2 = Convert.ToInt32(num4 / 1000); } } num3 = Convert.ToInt32(string.Concat(int num5 = num1 + 1, num5.ToString())); throw new Exception(string.Concat("Could not insert supplier. ", exception.Message)); } } catch (Exception exception) { } } return(num3); }
public bool insertSuppliers(string name, string pname, string address, long?phone, int accCode, decimal balance) { bool flag; using (SupplierTableAdapter supplierTableAdapter = new SupplierTableAdapter()) { try { supplierTableAdapter.Insert(name, pname, address, phone, new int?(accCode), new decimal?(balance)); flag = true; } catch (Exception exception) { throw new Exception(string.Concat("Could not insert supplier. ", exception.Message)); } } return(flag); }
public bool deleteSupplier(int AccCode) { bool flag; using (SupplierTableAdapter supplierTableAdapter = new SupplierTableAdapter()) { try { supplierTableAdapter.Delete(new int?(AccCode)); flag = true; } catch (Exception exception) { throw new Exception(string.Concat("Could not delete Supplier. ", exception.Message)); } } return(flag); }
public bool updateSuppliers(string name, string pname, string address, long?phone, int accCode, int suppID, int oldAcc) { bool flag; using (SupplierTableAdapter supplierTableAdapter = new SupplierTableAdapter()) { try { supplierTableAdapter.Update(name, pname, address, phone, new int?(accCode), new int?(oldAcc), new int?(suppID)); flag = true; } catch (Exception exception) { throw new Exception(string.Concat("Could not update supplier. ", exception.Message)); } } return(flag); }
private void btnSearch_Click(object sender, EventArgs e) { SupplierTableAdapter.FillBy(this.Store_ManagerDataSet.Supplier, "%" + txtBoxName.Text + "%", "%" + txtBoxSurname.Text + "%"); this.raporTedarikçiGöster.RefreshReport(); }
private void btnAra_Click(object sender, EventArgs e) { SupplierTableAdapter.FillBy(this.Store_ManagerDataSet.Supplier, "%" + txtBoxAdı.Text + "%", "%" + txtBoxSoyadı.Text + "%"); raporTedarikçileriGöster.RefreshReport(); }