public bool RegisterUser(string Practicetype, string Project_Code, string Project_Name, string Category, string Sub_Category, string Category_ID, string Sub_Category_ID, string Header, string Abstract, string Detailed_Content, string Meta_Tags, string Tangible_Intangible_Benefits, string KeyTeam_Involved, string Comments, string Status, string Pending_With, string AttachmentPath) { try { Best_Practice_dt userInfoDB = new Best_Practice_dt(); userInfoDB.Practicetype = Practicetype; userInfoDB.Project_Code = Project_Code; userInfoDB.Project_Name = Project_Name; userInfoDB.Category = Category; userInfoDB.Sub_Category = Sub_Category; userInfoDB.Category_ID = Category_ID; userInfoDB.Sub_Category_ID = Sub_Category_ID; userInfoDB.Header = Header; userInfoDB.Abstract = Abstract; userInfoDB.Detailed_Content = Detailed_Content; userInfoDB.Meta_Tags = Meta_Tags; userInfoDB.Tangible_Intangible_Benefits = Tangible_Intangible_Benefits; userInfoDB.KeyTeam_Involved = KeyTeam_Involved; userInfoDB.Status = Status; userInfoDB.Pending_With = Pending_With; userInfoDB.AttachmentPath = AttachmentPath; this.dbContext.Entry(userInfoDB).State = System.Data.Entity.EntityState.Added; return(this.dbContext.SaveChanges() > 0); } catch (Exception exception) { LogUtilities.LogException(exception, LogPriorityID.High, MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name); throw; } }
public OperationResult RegisterUser(string Practicetype, string Project_Code, string Project_Name, string Category, string Sub_Category, string Category_ID, string Sub_Category_ID, string Header, string Abstract, string Detailed_Content, string Meta_Tags, string Tangible_Intangible_Benefits, string KeyTeam_Involved, string Comments, string Status, string Pending_With, string AttachmentPath) { try { bool isSuccess; Best_Practice_dt user = default(Best_Practice_dt); using (UnitOfWork uow = new UnitOfWork()) { var userDB = uow.GetDbInterface <UserDB>(); isSuccess = userDB.RegisterUser(Practicetype, Project_Code, Project_Name, Category, Sub_Category, Category_ID, Sub_Category_ID, Header, Abstract, Detailed_Content, Meta_Tags, Tangible_Intangible_Benefits, KeyTeam_Involved, Comments, Status, Pending_With, AttachmentPath); } return(new OperationResult() { Success = true, Message = "User registered successfully", MCode = MessageCode.OperationSuccessful, Data = false }); } catch (SIPException exception) { LogUtilities.LogException(exception, LogPriorityID.High, MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name); return(exception.Result); } catch (Exception exception) { LogUtilities.LogException(exception, LogPriorityID.High, MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name); throw; } }