public int UpdatePage(PageFormUI pageFormUI, int id) { int result = 0; result = pageFormDAL.UpdatePage(pageFormUI, id); return(result); }
public int AddPage(PageFormUI pageFormUI) { int result = 0; result = pageFormDAL.AddPage(pageFormUI); return(result); }
public int UpdatePage(PageFormUI pageMappingFormUI, int id) { int result = 0; try { using (SqlConnection SupportCon = new SqlConnection(connectionString)) { SupportCon.Open(); SqlCommand sqlCmd = new SqlCommand("prPageMappingUpdate", SupportCon); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.CommandTimeout = commandTimeout; sqlCmd.Parameters.Add("@PageMappingX", SqlDbType.VarChar, 50); sqlCmd.Parameters["@PageMappingX"].Value = pageMappingFormUI.PageMappingX; sqlCmd.Parameters.Add("@UpdatedOnDate", SqlDbType.DateTime); sqlCmd.Parameters["@UpdatedOnDate"].Value = pageMappingFormUI.UpdatedOn; sqlCmd.Parameters.Add("@PageMapping", SqlDbType.Int); sqlCmd.Parameters["@PageMapping"].Value = id; result = sqlCmd.ExecuteNonQuery(); sqlCmd.Dispose(); SupportCon.Close(); } } catch (Exception exp) { logExcpUIobj.MethodName = "UpdatePage()"; logExcpUIobj.ResourceName = "PageFormDAL.CS"; logExcpUIobj.RecordId = ""; logExcpUIobj.ExceptionDetails = "Error Occured. System Generated Error is: " + exp.ToString(); logExcpDALobj.SaveExceptionToDB(logExcpUIobj); log.Error("[PageFormDAL : UpdatePage] An error occured in the processing of Record. Details : [" + exp.ToString() + "]"); } return(result); }