public TabkIntegrationBeforFix()
 {
     InitializeComponent();
     this.RightToLeft = Gizmox.WebGUI.Forms.RightToLeft.Yes;
     txtTankNumber.Leave += new EventHandler(txtTankNumber_Leave);
     using (GazOnDevEntities db = new GazOnDevEntities())
     {
         dbconf = db.Configdbs.FirstOrDefault();
         txtfixnumber.Text = dbconf.tankfixformnum;
       //  txtTankNumber.Text = dbconf.tanknumber;
     }
 }
Beispiel #2
0
        public TankInvoice()
        {
            InitializeComponent();

              dataGridView1.CellClick+=new DataGridViewCellEventHandler(dataGridView1_CellClick);
             dataGridView1.KeyDown +=new KeyEventHandler(dataGridView1_KeyDown);
             this.RightToLeft = Gizmox.WebGUI.Forms.RightToLeft.Yes;
            txtinvoiceid.Leave += new EventHandler(txtinvoiceid_Leave);
            txtTankNymber.Leave += new EventHandler(txtTankNymber_Leave);
            dataGridView1.AllowUserToAddRows = true;
            dataGridView1.ReadOnly = false;
            dataGridView1.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2;

             //dataGridView1.KeyDown+=new KeyEventHandler(dataGridView1_KeyDown);
             //dataGridView1.KeyPress += new KeyPressEventHandler(dataGridView1_KeyPress);
            using (GazOnDevEntities db= new GazOnDevEntities())
            {

                 dbconf= db.Configdbs.FirstOrDefault();
                txtinvoiceid.Text = dbconf.invoicelastid;

                var query = from p in db.Accompanying_stocks
                                 where p.isininvoice == true
                                 orderby p.invoiceorder ascending
                                 select p;
                List<Accompanying_stocks>  newstocklist = new List<Accompanying_stocks>(query.ToList<Accompanying_stocks>());
                Accompanying_stocks temp=new Accompanying_stocks();
                int k = 1;
                foreach (Accompanying_stocks item in newstocklist)
                { invoiceitem invitm=new invoiceitem();
                    invitm.invoiceid =txtinvoiceid.Text;
                     invitm.title =item.Title;
                     invitm.type = "stock";
                     invitm.typeid = item.Id.ToString();
                     invitm.num = k.ToString();
                     k++;
                     _currentinvoiceitems.Add(invitm);

                }

                bindingSource1.DataSource = _currentinvoiceitems;
                //stocklist.Add(temp);
                //stocklist.Add(temp);

                // must icrease id of invoice id  ;
            }

              //  textBox1.Leave += new EventHandler(textBox1_Leave);
        }
Beispiel #3
0
        /*  BindingSource _bsTankOpen;
        GazOnDevEntities db2 = new GazOnDevEntities();*/
        public TabkOpen()
        {
            InitializeComponent();
            this.RightToLeft = Gizmox.WebGUI.Forms.RightToLeft.Yes;

               // _bsTankOpen = new BindingSource(typeof(Tank_Stocks), "");

            txtTankNumber.Leave += new EventHandler(txtTankNumber_Leave);

             Tank_Stocks tanktofix;
             BindingList<invoiceitem> _currentinvoiceitems = new BindingList<invoiceitem>();
             Invoice _currentinvoice = new Invoice();

            using (GazOnDevEntities db= new GazOnDevEntities())
            {

                 dbconf= db.Configdbs.FirstOrDefault();
                txtTankNumber.Text = dbconf.tanknumber;
                // must icrease id of invoice id  ;
            }
              //  textBox1.Leave += new EventHandler(textBox1_Leave);
        }
Beispiel #4
0
 /// <summary>
 /// Create a new Configdb object.
 /// </summary>
 /// <param name="id">Initial value of the id property.</param>
 public static Configdb CreateConfigdb(global::System.Int32 id)
 {
     Configdb configdb = new Configdb();
     configdb.id = id;
     return configdb;
 }
Beispiel #5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Configdbs EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToConfigdbs(Configdb configdb)
 {
     base.AddObject("Configdbs", configdb);
 }