Ejemplo n.º 1
0
 private void รายงานสรปรายวนToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmRptReport rpt = new frmRptReport(Case_.CashierNew);
     rpt.Show();
 }
Ejemplo n.º 2
0
        private void บลสงเงนToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dataGridView1.Rows.Count == 0) return;
            if (dataGridView1.SelectedRows.Count == 0) return;

            string no = dataGridView1.SelectedRows[0].Cells["SId"].Value.ToString();
            string base_ = dataGridView1.SelectedRows[0].Cells["Base"].Value.ToString();
            frmRptReport rpt = new frmRptReport(no, base_, Case_.BillSend);
            rpt.ShowDialog();
        }
Ejemplo n.º 3
0
        private void บลแคชเชยรToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (DgvHead.Rows.Count == 0) return;
            if (DgvHead.SelectedRows.Count == 0) return;

            string no = DgvHead.SelectedRows[0].Cells["ChId"].Value.ToString();
            string base_ = DgvHead.SelectedRows[0].Cells["Base"].Value.ToString();
            frmRptReport rpt = new frmRptReport(no, base_, Case_.BiilCashier);
            rpt.ShowDialog();
        }
Ejemplo n.º 4
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            if (!ValidateValue()) return;

            List<string> iSql = new List<string>();

            if (EditId != "")
            {
                iSql.Add("DELETE FROM CashierSend WHERE SId = '" + EditId + "' ");
            }

            string Amnt = "";

            for (int i = 1; i <= 11; ++i)
            {
                Amnt += ((TextBox)tableLayoutPanel3.Controls["txtA" + i]).Text + "#";
            }

            iSql.Add("INSERT INTO CashierSend (SId,SDate,SDateSave,SBank,SAmnt,UserName,SNote,SPeriod,CashierStatusId)VALUES" +
                "('" + txtNo.Text.Trim() + "','" + Class.Function.GetDate(dateTimePicker1.Value) + "',GETDATE(),'" + Amnt + "'," + txtSum.Text.Trim().Replace(",", "") + ",'" + Class.DBConnString.UserName + "','" + txtNote.Text.Trim() + "','" + (radioMor.Checked ? "1" : "0") + "',1)");
            iSql.Add("INSERT INTO CashierSendLog (SId,SDate,SDateSave,SBank,SAmnt,UserName,SNote,SPeriod)VALUES" +
                "('" + txtNo.Text.Trim() + "','" + Class.Function.GetDate(dateTimePicker1.Value) + "',GETDATE(),'" + Amnt + "'," + txtSum.Text.Trim().Replace(",", "") + ",'" + Class.DBConnString.UserName + "','" + txtNote.Text.Trim() + "','" + (radioMor.Checked ? "1" : "0") + "')");

            if (MessageBox.Show("คุณต้องการบันทึกข้อมูลส่งเงิน " + txtNo.Text + "\nใช่หรือไม่ ?", "คำยืนยัน", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                if (cls.ExecuteTransactionNonAlert(iSql.ToArray()))
                {
                    if (MessageBox.Show("บันทึกสำเร็จ คุณต้องการพิมพ์รายงาน " + txtNo.Text + "\nใช่หรือไม่ ?", "คำยืนยัน", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                    {
                        frmRptReport rpt = new frmRptReport(txtNo.Text,comboBox1.Text,Case_.BillSend);
                        rpt.ShowDialog();
                    }
                    Clear();
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }

            }
        }