Example #1
0
        public SysBuyerAgent SetToBussinessObject(Sys_Buyer Entity)
        {
            SysBuyerAgent Model = new SysBuyerAgent();

            Model.BuyerID   = Entity.BuyerID;
            Model.BuyerName = Entity.BuyerName;
            Model.BuyerCode = Entity.BuyerCode;
            Model.AgentType = Entity.BuyerType;
            Model.IsActive  = Entity.IsActive == true ? "Active" : "Inactive";
            return(Model);
        }
Example #2
0
        public SysBuyerAgent SetToBussinessObject(Sys_BuyerAgent Entity)
        {
            SysBuyerAgent Model = new SysBuyerAgent();

            Model.BuyerAgentID = Entity.BuyerAgentID;
            Model.AgentID      = Entity.AgentID;
            Model.BuyerID      = Entity.BuyerID;
            Model.BuyerName    = _context.Sys_Buyer.Where(m => m.BuyerID == Entity.AgentID).FirstOrDefault().BuyerName;
            Model.AgentType    = Entity.AgentType;
            Model.IsActive     = Entity.IsActive == true ? "Active" : "Inactive";

            return(Model);
        }
Example #3
0
        public Sys_BuyerAgent SetToModelObject(SysBuyerAgent model)
        {
            Sys_BuyerAgent Entity = new Sys_BuyerAgent();

            Entity.BuyerAgentID = model.BuyerAgentID;
            Entity.AgentID      = model.AgentID;
            Entity.BuyerID      = model.BuyerID;
            Entity.AgentType    = model.AgentType;
            Entity.IsActive     = model.IsActive == "Active";
            Entity.SetOn        = DateTime.Now;
            Entity.SetBy        = model.SetBy;
            Entity.IPAddress    = string.Empty;
            return(Entity);
        }