Пример #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            paymentturn pay = new paymentturn(txtdoctor.Text, Convert.ToDouble(txtpayment.Text) / Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox1.Text), datenow.Value);

            readandwritepayment.writeinfile(pay);
            managenobat manage = new managenobat(x);

            manage.deletenobat(datenow.Value, txtfilecode.Text);
            foreach (Control c in panel1.Controls)
            {
                if (c is TextBox d)
                {
                    d.Text = "";
                }
            }
        }
        private void button1_Click(object sender, EventArgs e)
        { /* Boolean x= deleteturn.deleteturnfun(dateturn.Value, txtfileid.Text);*/
            nobatdehi delno = new nobatdehi();

            delno.date = dateturn.Value;
            managenobat manage = new managenobat(delno);
            Boolean     x      = manage.deletenobat(dateturn.Value, txtfileid.Text);

            if (x == true)
            {
                txtresult.Text = "succsesful";
            }
            else
            {
                txtresult.Text = "faild";
            }
        }
Пример #3
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (txtpayment.Text == "")
            {
                MessageBox.Show("not correct");
                return;
            }
            string saveincomefile = Application.StartupPath + "\\income.txt";
            string cost           = txtdoctor.Text + "*" + txtpayment.Text + "\n";

            System.IO.File.AppendAllText(saveincomefile, cost);
            managenobat manage = new managenobat(x);

            manage.deletenobat(datenow.Value, txtfilecode.Text);
            foreach (Control c in panel1.Controls)
            {
                if (c is TextBox d)
                {
                    d.Text = "";
                }
            }
        }