Inheritance: System.Windows.Forms.Form
        private void add_op_btn_Click(object sender, EventArgs e)
        {
            RefreshTransaction();

            Template_Title TT = new Template_Title();

            DialogResult Dr = TT.ShowDialog();

            if (TT.DialogResult == DialogResult.OK)
            {
                string TemplateName = TT.RetVal;

                TT.Dispose();

                TemplateAdapter.InsertNewLine(TemplateName, "OOM");

                TemplateAdapter.FillByType((ENGDataDataSet.TemplatesDataTable)OpsTemplateList.DataSource, "OOM");

                OpsTemplateList.CurrentCell = OpsTemplateList[0, OpsTemplateList.Rows.Count - 1];

                OPDataGrid.DataSource = GetFullTemplate(OpsTemplateList.CurrentCell.Value.ToString(), "OOM");

                oomtemplatename_txt.Text = OpsTemplateList.CurrentCell.Value.ToString();

                seq_txt.Text = "";

                opmast_cbo.SelectedIndex = -1;

                prodhrs_num.Value = 0;

                prodstd_cbo.SelectedValue = -1;

                SNRequiredOpr_chk.Checked = false;

                AutoRecieve_chk.Checked = false;

                laborentry_cbo.SelectedIndex = -1;

                subcon_opsmast_cbo.SelectedIndex = -1;

                refneeded_chk.Checked = false;

                qtyper_num.Value = 0;

                supplierid_txt.Text = "";

                quotesreq_num.Value = 0;

                unitcost_num.Value = 0;

                daysout_num.Value = 0;

                subconuom_cbo.SelectedIndex = -1;

                //OPDataGrid_CellClick(OPDataGrid, new DataGridViewCellEventArgs(0, 0));

                bool morePages;

                OpMaster OpMaster = new Epicor.Mfg.BO.OpMaster(DataList.EpicConn);

                DataSet ds = (DataSet)OpMaster.GetRows("", "", "", "", "", "", 100, 0, out morePages);

                opmast_cbo.DataSource = ds.Tables["OPMaster"];

                opmast_cbo.ValueMember = "OPCode";

                opmast_cbo.DisplayMember = "OPDesc";
            }
        }
        private void add_res_btn_Click(object sender, EventArgs e)
        {
            RefreshTransaction();

            Template_Title TT = new Template_Title();

            DialogResult Dr = TT.ShowDialog();

            if (TT.DialogResult == DialogResult.OK)
            {
                string TemplateName = TT.RetVal;

                TT.Dispose();

                TemplateAdapter.InsertNewLine(TemplateName, "RES");

                TemplateAdapter.FillByType((ENGDataDataSet.TemplatesDataTable)ResTemplateList.DataSource, "RES");
            }
        }
        private void add_bill_btn_Click(object sender, EventArgs e)
        {
            RefreshTransaction();

            Template_Title TT = new Template_Title();

            DialogResult Dr = TT.ShowDialog();

            if (TT.DialogResult == DialogResult.OK)
            {
                string TemplateName = TT.RetVal;

                TT.Dispose();

                TemplateAdapter.InsertNewLine(TemplateName, "BOM");

                TemplateAdapter.FillByType((ENGDataDataSet.TemplatesDataTable)BillTemplateList.DataSource, "BOM");

                BillTemplateList.ClearSelection();

                BillTemplateList[0, BillTemplateList.Rows.Count - 1].Selected = true;

                BillTemplateList_CellClick(BillTemplateList, new DataGridViewCellEventArgs(0, BillTemplateList.Rows.Count - 1));

                partnum_txt.Text = "";

                desc_txt.Text = "";

                operation_txt.Text = "";

                qty_num.Value = 0;

                bill_uom_cbo.SelectedIndex = -1;

                fill.SelectedIndex = -1;

                ViewAsAsm_chk.Checked = false;

                PullAsAsm_chk.Checked = false;
            }
        }