示例#1
0
文件: BankFlow.cs 项目: SoftSuite/ABB
 public BankData GetData(double loid)
 {
     BankData data = new BankData();
     if (DALObj.GetDataByLOID(loid, null))
     {
         data.LOID = DALObj.LOID;
         data.CODE = DALObj.CODE;
         data.NAME = DALObj.NAME;
     }
     return data;
 }
示例#2
0
文件: BankFlow.cs 项目: SoftSuite/ABB
        public bool UpdateData(string userID, BankData data)
        {
            bool ret = true;
            if (VeridateData(data))
            {

                OracleDBObj obj = new OracleDBObj();
                obj.CreateConnection();
                obj.CreateTransaction();
                try
                {
                    DALObj.GetDataByLOID(data.LOID, obj.zTrans);
                    DALObj.CODE = data.CODE.Trim();
                    DALObj.NAME = data.NAME.Trim();
                    DALObj.ACTIVE = Constz.ActiveStatus.Active;

                    if (DALObj.OnDB)
                        ret = DALObj.UpdateCurrentData(userID, obj.zTrans);
                    else
                        ret = DALObj.InsertCurrentData(userID, obj.zTrans);

                    _LOID = DALObj.LOID;

                    if (ret)
                    {
                        obj.zTrans.Commit();
                        obj.CloseConnection();
                    }
                    else
                    {
                        _error = DALObj.ErrorMessage;
                    }
                }
                catch (Exception ex)
                {
                    obj.zTrans.Rollback();
                    obj.CloseConnection();
                    ret = false;
                    throw new ApplicationException(ex.Message);
                }
            }
            else
                ret = false;
            return ret;
        }
示例#3
0
文件: BankFlow.cs 项目: SoftSuite/ABB
        private bool VeridateData(BankData data)
        {
            bool ret = true;
            if (data.NAME.Trim() == "")
            {
                _error = "¡ÃسÒÃкت×è͸¹Ò¤ÒÃ";
                ret = false;
            }

            else if (DALObj.CheckName(data.LOID, data.NAME.Trim()) == false)
            {
                _error = "ª×è͸¹Ò¤ÒùÕéÁÕÍÂÙèáÅéÇ";
                ret = false;
            }
            return ret;
        }