Exemplo n.º 1
0
        //http://www.smarterasp.net/support/kb/a1579/how-can-i-restore-mssql-database-to-your-server.aspx?KBSearchID=154297
        private void Comman_Transaction_Load(object sender, EventArgs e)
        {
            try
            {
                //pictureBox2.Image= Properties.Resources.
                DataTable dt = new DataTable();
                this.FormBorderStyle = FormBorderStyle.FixedSingle;
                FillDataGrid(label7.Text, Convert.ToInt32(comboBox2.SelectedValue));
                AcceptButton = btnAdd;
                if (label7.Text == "ct")
                {
                    dt = ms.GetCommanTransactionList("ct");
                    rc.common_loadDropDown(dt, ddlTransactionType);
                    label8.Visible       = false;
                    txttotAmount.Visible = false;
                    comboBox2.Enabled    = false;
                    //Comman_Transaction ct = new Comman_Transaction(0, "");
                    //ct.Text = "Comman Transaction";
                    label1.Text = "Comman Transaction";
                }
                else if (label7.Text == "idt")
                {
                    dt = ms.GetCommanTransactionList("idt");
                    rc.common_loadDropDown(dt, ddlTransactionType);
                    label1.Text = "Individual Transaction";

                    txttotAmount.Visible = true;
                    txttotAmount.Text    = Convert.ToString(ms.GetTotalExpensessAmountByUserID(Convert.ToInt32(comboBox2.SelectedValue)));
                    //Comman_Transaction ct = new Comman_Transaction(0, "");
                    //ct.Text = "Individual Transaction";
                }
                else if (label7.Text == "iall")
                {
                    dt = ms.GetCommanTransactionList("idt");
                    rc.common_loadDropDown(dt, ddlTransactionType);
                    label1.Text          = "Edit User Individual Transaction";
                    label8.Visible       = true;
                    txttotAmount.Visible = true;
                    Comman_Transaction ct = new Comman_Transaction(0, "");
                    ct.Text = "Edit User Individual Transaction";
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + "\nPlease Call system Administrator.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 2
0
        private void individualTransactionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Comman_Transaction idt = new Comman_Transaction(Convert.ToInt32(label2.Text), "idt");

            idt.ShowDialog();
        }
Exemplo n.º 3
0
        private void commanTransactionToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Comman_Transaction ct = new Comman_Transaction(Convert.ToInt32(label2.Text), "ct");

            ct.ShowDialog();
        }