Beispiel #1
0
        public string UpdateWorkInfo(MyAccountModel model, long UserID)
        {
            string          msg       = "";
            ShomaRMEntities db        = new ShomaRMEntities();
            var             tblTenant = db.tbl_TenantInfo.Where(p => p.TenantID == model.ID).FirstOrDefault();

            if (tblTenant != null)
            {
                tbl_TenantInfo objTable = new tbl_TenantInfo();
                tblTenant.TenantID     = model.ID;
                tblTenant.JobTitle     = model.JobTitle;
                tblTenant.JobType      = Convert.ToInt32(model.JobType);
                tblTenant.EmployerName = model.EmployerName;
                db.SaveChanges();
            }
            var getTenatId = db.tbl_ApplyNow.Where(co => co.UserId == UserID).FirstOrDefault();

            var tblTInfo = db.tbl_TenantInfo.Where(p => p.ProspectID == getTenatId.ID).FirstOrDefault();

            var tblTenantOnline = db.tbl_TenantOnline.Where(p => p.ProspectID == tblTInfo.ProspectID).FirstOrDefault();

            if (tblTenantOnline != null)
            {
                tbl_TenantOnline objTable = new tbl_TenantOnline();

                tblTenantOnline.JobTitle     = model.JobTitle;
                tblTenantOnline.JobType      = Convert.ToInt32(model.JobType);
                tblTenantOnline.EmployerName = model.EmployerName;
                db.SaveChanges();
            }


            db.Dispose();
            return(msg);
        }
Beispiel #2
0
        public string UpdateContactInfo(MyAccountModel model, long UserId)
        {
            string          msg       = "";
            ShomaRMEntities db        = new ShomaRMEntities();
            var             tblTenant = db.tbl_TenantInfo.Where(p => p.TenantID == model.ID).FirstOrDefault();

            if (tblTenant != null)
            {
                tbl_TenantInfo objTable = new tbl_TenantInfo();
                tblTenant.TenantID      = model.ID;
                tblTenant.FirstName     = model.FirstName;
                tblTenant.LastName      = model.LastName;
                tblTenant.MiddleInitial = model.MiddleInitial;
                tblTenant.Mobile        = model.Mobile;
                tblTenant.Email         = model.Email;
                db.SaveChanges();

                var applyNow = db.tbl_ApplyNow.Where(p => p.UserId == UserId).FirstOrDefault();
                if (applyNow != null)
                {
                    applyNow.FirstName = model.FirstName;
                    applyNow.LastName  = model.LastName;
                    applyNow.Phone     = model.Mobile;
                    applyNow.Email     = model.Email;
                }
                db.SaveChanges();

                var loginDet = db.tbl_Login.Where(p => p.UserID == UserId).FirstOrDefault();
                if (loginDet != null)
                {
                    loginDet.FirstName = model.FirstName;
                    loginDet.LastName  = model.LastName;
                    loginDet.Email     = model.Email;
                    loginDet.Username  = model.Email;
                }
                db.SaveChanges();

                var tenantOnline = db.tbl_TenantOnline.Where(p => p.ProspectID == tblTenant.ProspectID).FirstOrDefault();
                if (tenantOnline != null)
                {
                    tenantOnline.FirstName     = model.FirstName;
                    tenantOnline.LastName      = model.LastName;
                    tenantOnline.MiddleInitial = model.MiddleInitial;
                    tenantOnline.Mobile        = model.Mobile;
                    tenantOnline.Email         = model.Email;
                }
                db.SaveChanges();
            }

            db.Dispose();
            return(msg);
        }
Beispiel #3
0
        public string UpdateEmContactInfo(MyAccountModel model, long UserId)
        {
            string          msg       = "";
            ShomaRMEntities db        = new ShomaRMEntities();
            var             tblTenant = db.tbl_TenantInfo.Where(p => p.TenantID == model.ID).FirstOrDefault();

            if (tblTenant != null)
            {
                tbl_TenantInfo objTable = new tbl_TenantInfo();
                tblTenant.TenantID           = model.ID;
                tblTenant.EmergencyFirstName = model.EmFirstNane;
                tblTenant.EmergencyLastName  = model.EmLastName;
                tblTenant.EmergencyMobile    = model.EmMobile;
                tblTenant.EmergencyWorkPhone = model.EmWorkPhone;
                tblTenant.EmergencyHomePhone = model.EmHomePhone;
                tblTenant.EmergencyAddress1  = model.EmAddress1;
                tblTenant.EmergencyAddress2  = model.EmAddress2;
                tblTenant.EmergencyEmail     = model.EmEmail;
                tblTenant.Relationship       = model.EmRelation;
                db.SaveChanges();
            }
            var getTenatId = db.tbl_ApplyNow.Where(co => co.UserId == UserId).FirstOrDefault();

            var tblTInfo = db.tbl_TenantInfo.Where(p => p.ProspectID == getTenatId.ID).FirstOrDefault();

            var tblTenantOnline = db.tbl_TenantOnline.Where(p => p.ProspectID == tblTInfo.ProspectID).FirstOrDefault();

            if (tblTenantOnline != null)
            {
                tbl_TenantOnline objTable = new tbl_TenantOnline();

                tblTenantOnline.EmergencyFirstName = model.EmFirstNane;
                tblTenantOnline.EmergencyLastName  = model.EmLastName;
                tblTenantOnline.EmergencyMobile    = model.EmMobile;
                tblTenantOnline.EmergencyWorkPhone = model.EmWorkPhone;
                tblTenantOnline.EmergencyHomePhone = model.EmHomePhone;
                tblTenantOnline.EmergencyAddress1  = model.EmAddress1;
                tblTenantOnline.EmergencyAddress2  = model.EmAddress2;
                tblTenantOnline.EmergencyEmail     = model.EmEmail;
                tblTenantOnline.Relationship       = model.EmRelation;
                db.SaveChanges();
            }

            db.Dispose();
            return(msg);
        }
Beispiel #4
0
        public string SaveProfilePic(MyAccountModel model)
        {
            string          msg       = "";
            ShomaRMEntities db        = new ShomaRMEntities();
            var             tblTenant = db.tbl_TenantInfo.Where(p => p.TenantID == model.ID).FirstOrDefault();

            if (tblTenant != null)
            {
                tbl_TenantInfo objTable = new tbl_TenantInfo();
                tblTenant.TenantID              = model.ID;
                tblTenant.ProfilePicture        = model.TempProfilePic;
                tblTenant.OrginalProfilePicture = model.OriginalProfileFile;
                db.SaveChanges();
            }

            db.Dispose();
            return(msg);
        }