Esempio n. 1
0
        public Result DeleteConfigurationMaster(string ConfigId)
        {
            try
            {
                using (DB_A3E3FF_scampusMaster2020Context db = new DB_A3E3FF_scampusMaster2020Context())
                {
                    var data = db.ConfigurationMaster.Where(x => x.ConfigId.ToString() == ConfigId).FirstOrDefault();
                    data.IsActive = false;
                    var result = db.SaveChanges();
                    if (result == 1)
                    {
                        return(new Result {
                            StatusCode = 1, Message = "Configuration Added Successfully ..!"
                        });
                    }
                    else
                    {
                        return(new Result {
                            StatusCode = -1, Message = "Configuration Failed ..!"
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                return(new Result {
                    StatusCode = -1, Message = ex.Message
                });

                throw ex;
            }
        }
Esempio n. 2
0
        public Result AddConfigurationMaster(ConfigurationMaster configurationMaster)
        {
            try
            {
                ConfigurationMaster configurationMaster1 = new ConfigurationMaster();
                using (DB_A3E3FF_scampusMaster2020Context db = new DB_A3E3FF_scampusMaster2020Context())
                {
                    configurationMaster1.ConfigName                 = configurationMaster.ConfigName;
                    configurationMaster1.NoOfBranches               = configurationMaster.NoOfBranches;
                    configurationMaster1.NoOfStaff                  = configurationMaster.NoOfStaff;
                    configurationMaster1.NoOfStudent                = configurationMaster.NoOfStudent;
                    configurationMaster1.NoOfVideoConferenceDaily   = configurationMaster.NoOfVideoConferenceDaily;
                    configurationMaster1.MaxDurationOfConference    = configurationMaster.MaxDurationOfConference;
                    configurationMaster1.MaxNoOfVideoRecording      = configurationMaster.MaxNoOfVideoRecording;
                    configurationMaster1.MaxParticipantInConference = configurationMaster.MaxParticipantInConference;
                    configurationMaster1.BaseUrl          = configurationMaster.BaseUrl;
                    configurationMaster1.BrandLogo        = configurationMaster.BrandLogo;
                    configurationMaster1.PageTitle        = configurationMaster.PageTitle;
                    configurationMaster1.AccoutExpiryDate = configurationMaster.AccoutExpiryDate;
                    configurationMaster1.BrandName        = configurationMaster.BrandName;
                    configurationMaster1.BrandCode        = configurationMaster.BrandCode;
                    configurationMaster1.PageTitle        = configurationMaster.PageTitle;
                    configurationMaster1.UpdatedBy        = configurationMaster.CreatedBy;
                    configurationMaster1.UpdatedDate      = configurationMaster.CreatedDate;

                    db.ConfigurationMaster.Add(configurationMaster1);
                    var result = db.SaveChanges();
                    if (result == 1)
                    {
                        return(new Result {
                            StatusCode = 1, Message = "Added Successfully..!"
                        });
                    }
                    else
                    {
                        return(new Result {
                            StatusCode = -1, Message = "Added Failed..!"
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                return(new Result {
                    StatusCode = -1, Message = ex.Message
                });

                throw ex;
            }
        }
Esempio n. 3
0
        public Result UpdateConfigurationMaster(ConfigurationMaster configurationMaster)
        {
            try
            {
                using (DB_A3E3FF_scampusMaster2020Context db = new DB_A3E3FF_scampusMaster2020Context())
                {
                    var data = db.ConfigurationMaster.Where(x => x.ConfigId == configurationMaster.ConfigId).FirstOrDefault();
                    data.ConfigName                 = configurationMaster.ConfigName;
                    data.NoOfBranches               = configurationMaster.NoOfBranches;
                    data.NoOfStaff                  = configurationMaster.NoOfStaff;
                    data.NoOfStudent                = configurationMaster.NoOfStudent;
                    data.NoOfVideoConferenceDaily   = configurationMaster.NoOfVideoConferenceDaily;
                    data.MaxDurationOfConference    = configurationMaster.MaxDurationOfConference;
                    data.MaxNoOfVideoRecording      = configurationMaster.MaxNoOfVideoRecording;
                    data.MaxParticipantInConference = configurationMaster.MaxParticipantInConference;
                    data.BaseUrl          = configurationMaster.BaseUrl;
                    data.BrandLogo        = configurationMaster.BrandLogo;
                    data.PageTitle        = configurationMaster.PageTitle;
                    data.AccoutExpiryDate = configurationMaster.AccoutExpiryDate;
                    data.BrandName        = configurationMaster.BrandName;
                    data.BrandCode        = configurationMaster.BrandCode;
                    data.PageTitle        = configurationMaster.PageTitle;
                    data.UpdatedBy        = configurationMaster.CreatedBy;
                    data.UpdatedDate      = configurationMaster.CreatedDate;
                    var result = db.SaveChanges();
                    if (result == 1)
                    {
                        return(new Result {
                            StatusCode = 1, Message = "Configuration Updated Successfully ..!"
                        });
                    }
                    else
                    {
                        return(new Result {
                            StatusCode = -1, Message = "Configuration Failed ..!"
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                return(new Result {
                    StatusCode = -1, Message = ex.Message
                });

                throw ex;
            }
        }
Esempio n. 4
0
        public Result AddUser(userDetails inUsers)
        {
            try
            {
                InUsers inUsers1 = new InUsers();
                using (DB_A3E3FF_scampusMaster2020Context db = new DB_A3E3FF_scampusMaster2020Context())
                {
                    inUsers1.Username      = inUsers.Username;
                    inUsers1.Password      = inUsers.Password;
                    inUsers1.Role          = inUsers.Role;
                    inUsers1.CreatedBy     = inUsers.CreatedBy;
                    inUsers1.CreatedById   = inUsers.CreatedById;
                    inUsers1.EmailId       = inUsers.EmailId;
                    inUsers1.AccountStatus = inUsers.AccountStatus;
                    inUsers1.CreatedDate   = DateTime.Now;
                    inUsers1.Configuration = inUsers.ConfiguratoinId;
                    inUsers1.BaseUrl       = inUsers1.BaseUrl;
                    db.InUsers.Add(inUsers1);
                    var result = db.SaveChanges();
                    if (result == 1)
                    {
                        return(new Result {
                            StatusCode = 1, Message = "User Added Successfully ..!"
                        });
                    }
                    else
                    {
                        return(new Result {
                            StatusCode = -1, Message = "User Failed ..!"
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                return(new Result {
                    StatusCode = -1, Message = ex.Message
                });

                throw ex;
            }
        }
Esempio n. 5
0
        public Result UpdateUser(userDetails inUsers)
        {
            try
            {
                using (DB_A3E3FF_scampusMaster2020Context db = new DB_A3E3FF_scampusMaster2020Context())
                {
                    var data = db.InUsers.Where(x => x.Id == inUsers.Id).FirstOrDefault();
                    data.Username      = inUsers.Username;
                    data.Password      = inUsers.Password;
                    data.EmailId       = inUsers.EmailId;
                    data.Configuration = inUsers.ConfiguratoinId;
                    data.AccountStatus = inUsers.AccountStatus;
                    data.Role          = inUsers.Role;
                    data.CreatedById   = inUsers.CreatedById;
                    data.UpdatedBy     = "Admin";
                    data.UpdatedDate   = DateTime.Now;
                    data.BaseUrl       = inUsers.BaseUrl;
                    var result = db.SaveChanges();
                    if (result == 1)
                    {
                        return(new Result {
                            StatusCode = 1, Message = "User Updated Successfully ..!"
                        });
                    }
                    else
                    {
                        return(new Result {
                            StatusCode = -1, Message = "User Failed ..!"
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                return(new Result {
                    StatusCode = -1, Message = ex.Message
                });

                throw ex;
            }
        }
Esempio n. 6
0
        public Result AddConfiguration(ConfigurationDetail inConfiguration)
        {
            try
            {
                InConfiguration inConfiguration1 = new InConfiguration();
                using (DB_A3E3FF_scampusMaster2020Context db = new DB_A3E3FF_scampusMaster2020Context())
                {
                    inConfiguration1.EmpId       = inConfiguration.EmpId;
                    inConfiguration1.Name        = inConfiguration.Name;
                    inConfiguration1.Branch      = inConfiguration.Branch;
                    inConfiguration1.UserCount   = inConfiguration.UserCount;
                    inConfiguration1.CreatedBy   = "Admin";
                    inConfiguration1.CreatedDate = DateTime.Now;

                    db.InConfiguration.Add(inConfiguration1);
                    var result = db.SaveChanges();
                    if (result == 1)
                    {
                        return(new Result {
                            StatusCode = 1, Message = "Configuration Added Successfully ..!"
                        });
                    }
                    else
                    {
                        return(new Result {
                            StatusCode = -1, Message = "Configuration Failed ..!"
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                return(new Result {
                    StatusCode = -1, Message = ex.Message
                });

                throw ex;
            }
        }
Esempio n. 7
0
        public Result UpdateConfiguration(ConfigurationDetail inConfiguration)
        {
            try
            {
                using (DB_A3E3FF_scampusMaster2020Context db = new DB_A3E3FF_scampusMaster2020Context())
                {
                    var data = db.InConfiguration.Where(x => x.ConfId == inConfiguration.ConfId).FirstOrDefault();
                    data.EmpId       = inConfiguration.EmpId;
                    data.Name        = inConfiguration.Name;
                    data.Branch      = inConfiguration.Branch;
                    data.UserCount   = inConfiguration.UserCount;
                    data.UpdatedBy   = "Admin";
                    data.UpdatedDate = DateTime.Now;

                    var result = db.SaveChanges();
                    if (result == 1)
                    {
                        return(new Result {
                            StatusCode = 1, Message = "Configuration Updated Successfully ..!"
                        });
                    }
                    else
                    {
                        return(new Result {
                            StatusCode = -1, Message = "Configuration Failed ..!"
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                return(new Result {
                    StatusCode = -1, Message = ex.Message
                });

                throw ex;
            }
        }