Пример #1
0
        private void barButtonItem1_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)//save
        {
            // Commen_Form.Functions.DateConverter dc = new Commen_Form.Functions.DateConverter();
            gridView1.RefreshData();
            DataTable source = gridControl1.DataSource as DataTable;
            //source = dc.gridvalidation(source);
            DataTable dt = new DataTable();

            dt.Clear();
            dt.Columns.Add("deliveryno");
            dt.Columns.Add("date");
            dt.Columns.Add("salesPerson");
            dt.Columns.Add("customerId");
            dt.Columns.Add("customerName");
            dt.Columns.Add("address");
            dt.Columns.Add("contact");
            dt.Columns.Add("status");
            dt.Rows.Add(new object[] { txtdeliveryNo.Text, dtpdate.Text, txtsalesPerson.Text, CustomerId, txtCustomerName.Text, txtaddress.Text, txtemail.Text, "No Invoice" });
            Test.Sale.Database.SalesDeliveryData quatationData = new Sale.Database.SalesDeliveryData(source, dt);
            quatationData.FnConn();
            quatationData.fnTransactionData();
            string res = quatationData.FnTrans();

            MessageBox.Show(res, "Alert", MessageBoxButtons.OK, MessageBoxIcon.Information);
            barButtonItem1.Enabled = false;
            barButtonItem5.Enabled = true;
        }
Пример #2
0
        void loadData()
        {
            Sale.Database.SalesDeliveryData salesDeliveryData = new Sale.Database.SalesDeliveryData();
            salesDeliveryData.FnConn();
            DataTable dt = salesDeliveryData.FillData("S", "", "spsalesDelivery");

            if (dt.Rows.Count > 0)
            {
                gridControl1.DataSource = dt;
            }
            salesDeliveryData.FnTrans();
        }
Пример #3
0
 public Delivery_Note()
 {
     InitializeComponent();
     salesDeliveryData = new Sale.Database.SalesDeliveryData();
 }