예제 #1
0
        private void ContextMenu_GrfEcc_edit(object sender, System.EventArgs e)
        {
            if (grfEcc[grfEcc.Row, coleccId] == null)
            {
                return;
            }
            if (grfEcc.Row < 0)
            {
                return;
            }
            String eccid = "";

            eccid = grfEcc[grfEcc.Row, coleccId].ToString();
            if (eccid.Equals(""))
            {
                return;
            }

            int row = 0;

            row = grfEcc != null ? grfEcc.Rows.Count : 0;
            FrmExpenseClearCash frm = new FrmExpenseClearCash(xC, eccid, "", "", "", row.ToString());

            frm.WindowState   = FormWindowState.Normal;
            frm.StartPosition = FormStartPosition.CenterParent;
            frm.ShowDialog(this);
            setGrfEcc(cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "");
        }
예제 #2
0
        private void ContextMenu_GrfEcc_edit(object sender, System.EventArgs e)
        {
            String expnddid = "";

            if (grfEcc[grfEcc.Row, coleccId] == null)
            {
                return;
            }
            if (grfEcc.Row < 0)
            {
                return;
            }

            String eccid = "";

            eccid = grfEcc[grfEcc.Row, coleccId].ToString();
            if (eccid.Equals(""))
            {
                return;
            }
            txtID.Value = eccid;
            int row = 0;

            row = grfEcc != null ? grfEcc.Rows.Count : 0;
            FrmExpenseClearCash frm = new FrmExpenseClearCash(xC, txtID.Text, txtPdId.Text, "", txtJobCode.Text, row.ToString());

            frm.WindowState   = FormWindowState.Normal;
            frm.StartPosition = FormStartPosition.CenterParent;
            frm.ShowDialog(this);
            setGrfEcc(txtPdId.Text);
        }
        private void ContextMenu_GrfEcc_edit(object sender, System.EventArgs e)
        {
            if (grfEcc[grfEcc.Row, colEccId] == null)
            {
                return;
            }
            if (grfEcc.Row < 0)
            {
                return;
            }
            String eccid = "", flag = "";

            eccid = grfEcc[grfEcc.Row, colEccId].ToString();
            flag  = grfEcc[grfEcc.Row, colflag].ToString();
            if (eccid.Equals(""))
            {
                return;
            }


            if (flag.Equals("ecc"))
            {
                //int row = 0;
                //row = grfEcc != null ? grfEcc.Rows.Count : 0;
                FrmExpenseClearCash frm = new FrmExpenseClearCash(xC, eccid, "", "", "", "");
                frm.WindowState   = FormWindowState.Normal;
                frm.StartPosition = FormStartPosition.CenterParent;
                frm.ShowDialog(this);
            }
            else if (flag.Equals("erf"))
            {
                FrmExpenseClearCashRefund frm = new FrmExpenseClearCashRefund(xC, cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "", eccid);
                frm.WindowState   = FormWindowState.Normal;
                frm.StartPosition = FormStartPosition.CenterParent;
                frm.ShowDialog(this);
            }
            else if (flag.Equals("dd"))
            {
                xC.userIderc = cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "";
                FrmExpenseDraw frm = new FrmExpenseDraw(xC, eccid, FrmExpenseDraw.flagForm2.Cash, FrmExpenseDraw.flagAction.autoappv);
                frm.StartPosition = FormStartPosition.CenterParent;
                frm.WindowState   = FormWindowState.Normal;
                frm.ShowDialog(this);
            }
            setGrfEcc(cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "");
        }
예제 #4
0
        private void BtnDNew_Click(object sender, EventArgs e)
        {
            //throw new NotImplementedException();
            if (txtPdId.Text.Equals(""))
            {
                //MessageBox.Show("ไม่พบ รายการ เบิกค่าใช้จ่าย เงินสด", "");
                //return;
            }
            int row = 0;

            row = grfEcc != null ? grfEcc.Rows.Count: 0;
            FrmExpenseClearCash frm = new FrmExpenseClearCash(xC, "", txtPdId.Text, "", txtJobCode.Text, row.ToString());

            frm.WindowState   = FormWindowState.Normal;
            frm.StartPosition = FormStartPosition.CenterParent;
            frm.ShowDialog(this);
            setGrfEcc(txtPdId.Text);
        }