示例#1
0
        void selRow()
        {
            if (dgvData.CurrentCell != null && dgvData.CurrentCell.RowIndex >= 0)
            {
                var rowe = dgvData.CurrentCell.RowInfo;
                idCustomerPO = rowe.Cells["idCustomerPO"].Value.ToInt();

                if (dgvData.CurrentCell.ColumnInfo.Name.Equals("JobNo"))
                {
                    string jobNo = rowe.Cells["JobNo"].Value.ToSt();
                    if (!baseClass.Question("Do you want to open 'Job Order sheet' ?"))
                    {
                        return;
                    }
                    var m = new ProductionOrder(jobNo);
                    m.ShowDialog();
                    DataLoad();
                }
                else
                {
                    if (sType == 1)
                    {
                        var p = new CustomerPO(idCustomerPO);
                        p.ShowDialog();
                        DataLoad();
                    }
                    else
                    {
                        this.Close();
                    }
                }
            }
        }
示例#2
0
 private void radButtonElement1_Click(object sender, EventArgs e)
 {
     //select Item
     if (sType == 1)
     {
         var t = new ProductionOrder();
         t.ShowDialog();
     }
     else
     {
         selRow();
     }
 }
示例#3
0
        //Edit
        private void radButtonElement3_Click(object sender, EventArgs e)
        {
            dgvData.EndEdit();
            if (dgvData.CurrentCell == null)
            {
                return;
            }

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

            p.ShowDialog();
            DataLoad();
        }
示例#4
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();
             }
         }
     }
 }
示例#5
0
 void selRow()
 {
     dgvData.EndEdit();
     if (dgvData.CurrentCell != null && dgvData.CurrentCell.RowIndex >= 0)
     {
         t_JobNo = dgvData.CurrentCell.RowInfo.Cells["JobNo"].Value.ToSt();
         if (sType == 1)
         {
             var p = new ProductionOrder(t_JobNo);
             p.ShowDialog();
             DataLoad();
         }
         else
         {
             this.Close();
         }
     }
 }