Пример #1
0
        public AccountMaster Find(int?id)
        {
            AccountMaster AccountMaster = new AccountMaster();

            AccountMaster = GetDataList <AccountMaster>("Select *  from AccountMaster where AccountMasterId=" + id).SingleOrDefault();
            return(AccountMaster);
        }
Пример #2
0
        public bool InsertUpdate(AccountMaster AccountMaster)
        {
            try
            {
                string sql = string.Empty;
                sql = InsertUpdateQuery(AccountMaster);
                excuteCommand(sql);
                sql = "SELECT IDENT_CURRENT('AccountMaster' ) ";
                if (AccountMaster.AccountMasterId == 0)
                {
                    AccountMaster.AccountMasterId = Convert.ToInt32(GetScalerValue(sql));
                }
            }
            catch (Exception ex)
            {
                return(false);
            }
            finally
            {
            }


            return(true);
        }