Esempio n. 1
0
        public string addNewInstitute(Institution institution)
        {
            try
            {
                institution.user_crdate   = DateTime.Now;
                institution.user_isactive = true;
                //userlocked
                //user_failedattempt
                //user_lockedtilldate
                //user_crby
                //user_upddate
                int userid = objUserInfoDAL.getUserId(institution.user_email);
                if (userid == 0)
                {
                    objUserInfoDAL.addInstitution(institution);
                    userid = objUserInfoDAL.getUserId(institution.user_email);
                    institution.user_id = userid;
                    objUserInfoDAL.saveInstitutionInfo(institution);
                    return("Success");
                }
                else
                {
                    return("User Exists");
                }
            }
            catch (Exception ex)
            {
                CubitExceptionUtility.CubitExceptionLog(ex.Message + "BAL: Error while passing student details in to the DAL" + ex.StackTrace + " " + ex.InnerException, this.GetType().BaseType.Name.ToString(), DateTime.Now.ToLongTimeString(), DateTime.Now.ToLongDateString());

                return("Error");
            }
        }