コード例 #1
0
        public static bool Update(Agent entity)
        {
            MoneyPacificDataContext mpdb = new MoneyPacificDataContext();

            Agent existAgent = DataAccessLayer.GetConnection.Agents
                .Where(p => p.UserId.Equals(entity.UserId))
                .SingleOrDefault();

            existAgent.Address          = entity.Address;
            //existAgent.Block            = entity.Block;
            //existAgent.CreateDate       = entity.CreateDate;
            //existAgent.Email            = entity.Email;
            //existAgent.FirstName        = entity.FirstName;
            //existAgent.LastName         = entity.LastName;
            //existAgent.LastVisitDate    = entity.LastVisitDate;
            //existAgent.Password         = entity.Password;
            existAgent.Phone            = entity.Phone;
            existAgent.StatusId         = entity.StatusId;
            //existAgent.Username         = entity.Username;

            DataAccessLayer.GetConnection.SubmitChanges();
            
            mpdb.Connection.Close();
            return true;
        }
コード例 #2
0
ファイル: Agent.cs プロジェクト: vramsngrai1994/mkpacific-ltd
 public void CopyFrom(Agent entity)
 {
     // this.UserId = // ..
     this.StatusId = entity.StatusId;
     this.Phone = entity.Phone;
     this.Address = entity.Address;
 }
コード例 #3
0
        public static bool AddNew(Agent entity)
        {
            MoneyPacificDataContext mpdb = new MoneyPacificDataContext();

            mpdb.Agents.InsertOnSubmit(entity);
            mpdb.SubmitChanges();

            mpdb.Connection.Close();
            return true;
        }
コード例 #4
0
 partial void DeleteAgent(Agent instance);
コード例 #5
0
 partial void UpdateAgent(Agent instance);
コード例 #6
0
 partial void InsertAgent(Agent instance);
コード例 #7
0
		private void detach_Agents(Agent entity)
		{
			this.SendPropertyChanging();
			entity.AgentState = null;
		}
コード例 #8
0
		private void attach_Agents(Agent entity)
		{
			this.SendPropertyChanging();
			entity.AgentState = this;
		}
コード例 #9
0
 public bool IsExist(Agent entity)
 {
     // TODO:
     return true;
 }