Ejemplo n.º 1
0
 public EmbroideryBillView(EmbroideryOrderLineItem[] order, EmbroideryOrder Transaction)
 {
     InitializeComponent();
     this.order       = order;
     this.Transaction = Transaction;
     BillDataGridView.Rows.Clear();
 }
Ejemplo n.º 2
0
        public EmbroideryOrder LoadEmbroideryOrderTransactiondetails(string billno)
        {
            EmbroideryOrder e2;

            con                  = new SqlConnection();
            cmd                  = new SqlCommand();
            cmd.CommandText      = string.Format("select * from EmbroideryOrder where dealeruserid='{0}' and [BillNo.]='{1}'", dealer.UserId, billno);
            con.ConnectionString = Connection;
            con.Open();
            cmd.Connection = con;
            cmd.ExecuteNonQuery();
            reader = cmd.ExecuteReader();
            if (reader.Read())
            {
                e2 = new EmbroideryOrder(reader[0].ToString(), reader[1].ToString(), double.Parse(reader[2].ToString()), reader[3].ToString());

                reader.Close();
                con.Close();
                return(e2);
            }
            else
            {
                reader.Close();
                con.Close();
                return(null);
            }
        }
        public void CompleteOrderRecord(DataGridView d1, string bilno, string billissuedate, string dealerid, string imagepath)
        {
            OrderLineItem = new LinkedList <EmbroideryOrderLineItem>();
            for (int i = 0; i < d1.RowCount - 1; i++)
            {
                bool x;
                if (d1.Rows[i].Cells[5].Value.ToString() == "Yes")
                {
                    x = true;
                }
                else
                {
                    x = false;
                }
                string date = d1.Rows[i].Cells[6].Value.ToString();

                OrderLineItem.AddLast(new EmbroideryOrderLineItem(bilno, int.Parse(d1.Rows[i].Cells[0].Value.ToString()), d1.Rows[i].Cells[1].Value.ToString(), d1.Rows[i].Cells[2].Value.ToString(), double.Parse(d1.Rows[i].Cells[3].Value.ToString()), Double.Parse(d1.Rows[i].Cells[4].Value.ToString()), x, date, SaveImage(imagepath)));

                OrderTransactions = new EmbroideryOrder(bilno, billissuedate, totalamt, dealer.UserId);
                AddCodeName(d1.Rows[i].Cells[1].Value.ToString(), d1.Rows[i].Cells[2].Value.ToString());
            }
            WriteOrder();
            UpdateNewRemainingPayment();
            totalamt = 0;
        }
Ejemplo n.º 4
0
        public EmbroideryOrder[] LoadPrevoiusEmbdDealerTransactions()
        {
            LinkedList <EmbroideryOrder> e1 = new LinkedList <EmbroideryOrder>();

            con                  = new SqlConnection();
            cmd                  = new SqlCommand();
            cmd.CommandText      = string.Format("select [BillNo.] from EmbroideryOrder where dealeruserid='{0}'", dealer.UserId);
            con.ConnectionString = Connection;
            con.Open();
            cmd.Connection = con;
            cmd.ExecuteNonQuery();
            reader = cmd.ExecuteReader();
            while (reader.Read())
            {
                EmbroideryOrder e2 = new EmbroideryOrder();
                e2.BillNo = reader[0].ToString();
                e1.AddLast(e2);
            }

            con.Close();
            return(e1.ToArray <EmbroideryOrder>());
        }