Esempio n. 1
0
        public cCash doUpdate(string username, CashCategory key, double?cash, AccountAuditType addspend)
        {
            cCash ret = null;
            spCashReadListTableAdapter ta = new spCashReadListTableAdapter();
            var dt = ta.doUpdate(username, key.ToString(), cash, addspend.ToString(), DateTime.Now);

            if (dt != null)
            {
                if (dt.Rows.Count > 0)
                {
                    var dr = dt.FirstOrDefault();
                    ret = getCash(dr);
                }
            }
            return(ret);
        }
Esempio n. 2
0
        public cCash getCash(ds_cash.spCashReadListRow dr)
        {
            cCash ret = new cCash();

            ret.accUserName  = dr.accUserName;
            ret.accFirstName = dr.accFirstName;
            ret.accLastName  = dr.accLastName;
            ret.pcaDT        = dr.pcaDT;
            ret.pcaAmount    = dr.pcaAmount;
            if (!dr.IspcaTotalNull())
            {
                ret.pcaTotal = dr.pcaTotal;
            }
            ret.pccKey  = dr.pccKey;
            ret.pccName = dr.pccName;
            return(ret);
        }
Esempio n. 3
0
        public List <cCash> doReadList()
        {
            List <cCash> ret = null;

            spCashReadListTableAdapter ta = new spCashReadListTableAdapter();
            var dt = ta.doReadList();

            if (dt != null && dt.Rows.Count > 0)
            {
                ret = new List <cCash>();

                foreach (var dr in dt)
                {
                    cCash cash = getCash(dr);
                    ret.Add(cash);
                    ;
                }
            }

            return(ret);
        }