Beispiel #1
0
        private void ContextMenu_GrfRefund_edit(object sender, System.EventArgs e)
        {
            if (grfRefund[grfRefund.Row, coleccId] == null)
            {
                return;
            }
            if (grfRefund.Row < 0)
            {
                return;
            }
            String erfid = "";

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

            int row = 0;

            row = grfRefund != null ? grfRefund.Rows.Count : 0;
            FrmExpenseClearCashRefund frm = new FrmExpenseClearCashRefund(xC, cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "", erfid);

            frm.WindowState   = FormWindowState.Normal;
            frm.StartPosition = FormStartPosition.CenterParent;
            frm.ShowDialog(this);
            setGrfEcc(cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "");
        }
Beispiel #2
0
        private void BtnRefund_Click(object sender, EventArgs e)
        {
            //throw new NotImplementedException();
            FrmExpenseClearCashRefund frm = new FrmExpenseClearCashRefund(xC, cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "", "");

            frm.StartPosition = FormStartPosition.CenterParent;
            frm.ShowDialog(this);
            setGrfRefund(cboStaff.SelectedItem != null ? ((ComboBoxItem)(cboStaff.SelectedItem)).Value : "");
        }
        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 : "");
        }