Beispiel #1
0
        public void getDataForEdit(int clemID)
        {
            //clearData();
            clem_id = clemID;

            conDB.name_th                   = "";
            conDB.phone                     = "";
            conDB.serial                    = "";
            conDB.product_name_th           = "";
            conDB.in_document_number_string = "";
            conDB.status                    = "";

            DataSet ds = conDB.getListClem(clemType, clemID);
            DataRow dr = ds.Tables["get_list_clem"].Rows[0];

            //customerName.Text = dr["customer_name_th"].ToString();
            productType.Text = dr["product_type_name_th"].ToString();
            companyName.Text = dr["company_name_th"].ToString();

            productName.Text = dr["product_name"].ToString();
            serial.Text      = dr["serial"].ToString();
            //address.Text = dr["address"].ToString();
            //phone.Text = dr["phone"].ToString();
            status.Text = dr["status"].ToString();
            dtProductEndDate.DateTime = DateTime.Parse(dr["date_product"].ToString());
            //if (dr["status"].ToString() == "ในประกัน")
            //{
            //    radioButtonInWarranty.Checked = true;
            //}
            //else
            //{
            //    radioButtonOutWarranty.Checked = true;
            //}
            //textEditChargebacks.Text = dr["chargebacks"].ToString();
            symptom.Text       = dr["symptom"].ToString();
            equipment.Text     = dr["equipment"].ToString();
            detail.Text        = dr["detail"].ToString();
            inDocumentNumberID = int.Parse(dr["in_document_number_id"].ToString());

            inDocumentNumber.Text  = dr["in_document_number_str"].ToString();
            outDocumentNumber.Text = dr["out_document_number"].ToString();
            //inSerialClem.Text = dr["in_serial_clem"].ToString();
            //outSerialClem.Text = dr["out_serial_clem"].ToString();
            //customerClem.Text = dr["customer_name_th"].ToString();
            //employeeReceiveClem.Text = dr["employee_receive_clem"].ToString();
            employeeClem.Text           = dr["employee_clem"].ToString();
            companyReceiveClem.Text     = dr["company_receive_clem"].ToString();
            companyReturn.Text          = dr["company_return"].ToString();
            employeeReceiveProduct.Text = dr["employee_receive_product"].ToString();
            //employeeReturn.Text = dr["employee_return"].ToString();
            //customerReceiveProduct.Text = dr["customer_receive_product"].ToString();
            serial.Focus();
        }
        public void getListClem()
        {
            readData();
            DataSet list = conDB.getListClem(fRMMain.addEmployeeClem.clemType);

            if (list != null)
            {
                gridControl1.DataSource = list.Tables["get_list_clem"];
                setGridView();
                loadData();
            }
            serial.Focus();
        }