Example #1
0
        public void DeleteAgentTeleLogs(int AgentTeleLogId)
        {
            Core_AgentTeleLogs result = ent.Core_AgentTeleLogs.Where(x => x.AgentTeleLogId == AgentTeleLogId).FirstOrDefault();

            ent.DeleteObject(result);
            ent.SaveChanges();
        }
Example #2
0
        public void CreateAgentTeleLogs(AgentTeleLogsModel model)
        {
            Core_AgentTeleLogs obj = new Core_AgentTeleLogs();

            obj.AgentId               = (int)model.hdfAgentId;
            obj.Title                 = model.Title == "" ? "" : model.Title;
            obj.ContactPerson         = model.ContactPerson;
            obj.ContactNumber         = model.ContactNumber == "" ? "" : model.ContactNumber;
            obj.ProblemCategory       = model.ProblemCategoryId == "" ? "" : model.ProblemCategoryId;
            obj.Remarks               = model.Remarks == "" ? "" : model.Remarks;
            obj.CompetitorInformation = model.CompetitorInformation == "" ? "" : model.CompetitorInformation;
            obj.isNeedFollowUp        = model.isNeededFollowUp == true ? true : false;
            obj.CreatedBy             = model.CreatedBy;
            obj.CreatedDate           = DateTime.Now;

            ent.AddToCore_AgentTeleLogs(obj);
            ent.SaveChanges();
        }
Example #3
0
        public void EditAgentTeleLogs(AgentTeleLogsModel model)
        {
            Core_AgentTeleLogs result = ent.Core_AgentTeleLogs.Where(x => x.AgentTeleLogId == model.AgentTeleLogId).FirstOrDefault();

            result.AgentId               = (int)model.hdfAgentId;
            result.Title                 = model.Title == "" ? "" : model.Title;
            result.ContactPerson         = model.ContactPerson;
            result.ContactNumber         = model.ContactNumber == "" ? "" : model.ContactNumber;
            result.ProblemCategory       = model.ProblemCategoryId == "" ? "" : model.ProblemCategoryId;
            result.Remarks               = model.Remarks == "" ? "" : model.Remarks;
            result.CompetitorInformation = model.CompetitorInformation == "" ? "" : model.CompetitorInformation;
            result.isNeedFollowUp        = model.isNeededFollowUp == true ? true : false;
            result.CreatedBy             = model.CreatedBy;
            result.CreatedDate           = DateTime.Now;

            ent.ApplyCurrentValues(result.EntityKey.EntitySetName, result);
            ent.SaveChanges();
        }
Example #4
0
        public AgentTeleLogsModel DetailAgentTeleLogs(int AgentTeleLogId)
        {
            Core_AgentTeleLogs result = ent.Core_AgentTeleLogs.Where(x => x.AgentTeleLogId == AgentTeleLogId).FirstOrDefault();
            AgentTeleLogsModel model  = new AgentTeleLogsModel();

            model.AgentTeleLogId        = result.AgentTeleLogId;
            model.hdfAgentId            = result.AgentId;
            model.AgentName             = result.Agents.AgentName;
            model.Title                 = result.Title == "" ? "" : result.Title;
            model.ContactPerson         = result.ContactPerson;
            model.ContactNumber         = result.ContactNumber == "" ? "" : result.ContactNumber;
            model.ProblemCategoryId     = result.ProblemCategory == "" ? "" : result.ProblemCategory;
            model.Remarks               = result.Remarks == "" ? "" : result.Remarks;
            model.CompetitorInformation = result.CompetitorInformation == "" ? "" : result.CompetitorInformation;
            model.isNeededFollowUp      = result.isNeedFollowUp == true ? true : false;
            model.CreatedBy             = result.CreatedBy;
            model.CreatedDate           = result.CreatedDate;

            return(model);
        }