예제 #1
0
        public static String AddAccount()
        {
            String      accnm;
            frm_Account frm = new frm_Account();

            frm.calledIndirect = true;
            frm.LoadData("0", "Account");
            frm.ShowDialog();
            accnm = frm.AccName;
            return(accnm);
        }
예제 #2
0
        public static String EditAccount(String accnm, String acctyp)
        {
            String    newAccnm;
            String    acid;
            DataTable dtCheckAcc = new DataTable();

            Database.GetSqlData("select * from account where [name]='" + accnm + "'", dtCheckAcc);
            if (dtCheckAcc.Rows.Count == 0)
            {
                System.Windows.Forms.MessageBox.Show("Account does not exist");
                return("");
            }
            frm_Account frm = new frm_Account();

            frm.calledIndirect = true;
            frm.AccType        = acctyp;
            acid = Select_ac_id(accnm).ToString();
            frm.LoadData(acid, "Edit Account");
            frm.ShowDialog();
            newAccnm = frm.AccName;
            return(newAccnm);
        }