Beispiel #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();
                    }
                }
            }
        }
Beispiel #2
0
        public Model.VO.CustomerVO GetCustomerByID(int custID)
        {
            CustomerData customerData = new CustomerData();
            CustomerVO   customerVO   = new CustomerVO();
            CustomerPO   customerPO   = customerData.GetCustomerByID(custID);

            customerVO = Mapper.Map <CustomerPO, CustomerVO>(customerPO);

            return(customerVO);
        }
Beispiel #3
0
        void EditItem()
        {
            if (dgvData.CurrentCell == null)
            {
                return;
            }
            int idCustomerPO = dgvData.CurrentCell.RowInfo.Cells["idCustomerPO"].Value.ToInt();

            CustomerPO c = new CustomerPO(idCustomerPO);

            c.ShowDialog();
            DataLoad();
        }
Beispiel #4
0
 private void radButtonElement1_Click(object sender, EventArgs e)
 {
     //select Item
     if (sType == 1)
     {
         var t = new CustomerPO();
         t.ShowDialog();
     }
     else
     {
         selRow();
     }
 }
Beispiel #5
0
        public CustomerVO GetCustomerByCarNo(string carno)
        {
            CustomerData custdata = new CustomerData();
            CustomerPO   result   = custdata.GetCustomerByCarNo(carno);

            if (result != null)
            {
                return(Mapper.Map <CustomerPO, CustomerVO>(result));
            }
            else
            {
                return(new CustomerVO());
            }
        }
Beispiel #6
0
 public void EditCustomer(CustomerPO cust)
 {
     _daoCustomer.Update(cust);
 }
Beispiel #7
0
 public bool EditCustomer(CustomerPO cust, CarPO car)
 {
     return _daoCustomer.Update(cust, car);
 }
Beispiel #8
0
 public void AddCustomer(CustomerPO cust)
 {
     _daoCustomer.Add(cust);
 }
Beispiel #9
0
 public int AddAllCustomer(CustomerPO cust, CarPO car)
 {
     return _daoCustomer.AddAll(cust, car);
 }
Beispiel #10
0
 public int AddAllCustomer(CustomerPO cust, CarPO car)
 {
     return(_daoCustomer.AddAll(cust, car));
 }
Beispiel #11
0
 public void EditCustomer(CustomerPO cust)
 {
     _daoCustomer.Update(cust);
 }
Beispiel #12
0
 public void AddCustomer(CustomerPO cust)
 {
     _daoCustomer.Add(cust);
 }
Beispiel #13
0
 public bool EditCustomer(CustomerPO cust, CarPO car)
 {
     return(_daoCustomer.Update(cust, car));
 }