Esempio n. 1
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            DataTable pdfTable = new DataTable();

            string[] headers = { "Chase No.", "Item Text", "Part No.", "Ringi", "Vendor" };

            foreach (string header in headers)
            {
                pdfTable.Columns.Add(header);
            }

            foreach (SavedList item in savedList)
            {
                string itemText     = Mould.GetItemText(item.ChaseNo);
                string vendorName   = Vendor.GetVendorName(item.Vendor);
                string storedVendor = item.Vendor + " " + vendorName;

                string query = string.Format("update TB_MOULD_MAIN set m_ringi = '{0}' where m_chaseno = '{1}'", item.ChaseNo, item.Ringi);
                DataService.GetInstance().ExecuteNonQuery(query);

                pdfTable.Rows.Add(item.ChaseNo, itemText, item.PartNo, item.Ringi, storedVendor);
            }

            PdfUtil.ExportPdf(pdfTable);

            MessageBox.Show("Record has been saved.");

            this.LoadRingi(txtSearch.Text);
            this.LoadData(txtSearchItem.Text);
        }
Esempio n. 2
0
        public FaDisposalForm(string fixedAsset, string vendor, string chaseNo)
        {
            InitializeComponent();

            _fixedAsset = fixedAsset;
            _vendor     = vendor;
            _chaseNo    = chaseNo;
            _itemText   = Mould.GetItemText(chaseNo);
            _mpa        = Mould.GetMpa(chaseNo);

            lstAttachment = new List <string>();

            txtSection.Text  = GlobalService.IPO1st;
            txtDivision.Text = GlobalService.IPO2nd;
        }
        private void MenuItemClicked(object sender, EventArgs e)
        {
            ToolStripMenuItem item = (ToolStripMenuItem)sender;
            string            tag  = item.Tag.ToString();

            string chaseNo    = dgvMain.SelectedRows[0].Cells[1].Value.ToString();
            string vendor     = dgvMain.SelectedRows[0].Cells[2].Value.ToString();
            string mpa        = dgvMain.SelectedRows[0].Cells[14].Value.ToString();
            string fixedAsset = dgvMain.SelectedRows[0].Cells[15].Value.ToString();
            string itemText   = Mould.GetItemText(chaseNo);

            FaCancelForm form = new FaCancelForm(tag, fixedAsset, vendor, chaseNo, itemText, mpa);

            form.ShowDialog();
        }