Exemplo n.º 1
0
        //View
        private void radButtonElement2_Click(object sender, EventArgs e)
        {
            dgvData.EndEdit();
            if (dgvData.CurrentCell == null)
            {
                return;
            }

            string jobNo = dgvData.CurrentCell.RowInfo.Cells["PackingNo"].Value.ToSt();
            var    p     = new Packing(jobNo);

            p.ShowDialog();
            DataLoad();
        }
Exemplo n.º 2
0
 private void radButtonElement1_Click(object sender, EventArgs e)
 {
     //select Item
     if (sType == 1)
     {
         var t = new Packing();
         t.ShowDialog();
         DataLoad();
     }
     else
     {
         selRow();
     }
 }
Exemplo n.º 3
0
 void selRow()
 {
     if (dgvData.CurrentCell != null && dgvData.CurrentCell.RowIndex >= 0)
     {
         var row = dgvData.CurrentCell.RowInfo;
         if (dgvData.CurrentCell.ColumnInfo.Name == "RefNo") //JobNo
         {
             var j = new ProductionOrder(row.Cells["RefNo"].Value.ToSt());
             j.ShowDialog();
         }
         else if (dgvData.CurrentCell.ColumnInfo.Name == "CustomerPONo_TEMP")
         {
             int idDt = row.Cells["idCstmPODt"].Value.ToInt();
             using (var db = new DataClasses1DataContext())
             {
                 //var hd = db.mh_CustomerPODTs.Where(x => x.id == idDt && !x.forSafetyStock).FirstOrDefault();
                 var hd = db.mh_SaleOrderDTs.Where(x => x.id == idDt && !x.forSafetyStock).FirstOrDefault();
                 if (hd != null)
                 {
                     //var c = new CustomerPO(hd.idCustomerPO);
                     var c = new SaleOrder(hd.SONo);
                     c.ShowDialog();
                 }
             }
         }
         else
         {
             t_PackingNo = row.Cells["PackingNo"].Value.ToSt();
             if (sType == 1)
             {
                 string status = row.Cells["Status"].Value.ToSt();
                 if (status == "Active")
                 {
                     var pk = new Packing(t_PackingNo);
                     pk.ShowDialog();
                 }
                 else
                 {
                     //packing cancel
                 }
                 DataLoad();
             }
             else
             {
                 this.Close();
             }
         }
     }
 }