public int Course_DeleteDAL(CRMCourses _Organization) { return(ExecuteScalarInt32Sp("CRM_Course_Delete", ParamBuilder.Par("ID", _Organization.ID), ParamBuilder.Par("ModifiedBy", _Organization.ModifiedBy), ParamBuilder.Par("ModifiedDate", _Organization.ModifiedOn))); }
public int CourseUpdateDAL(CRMCourses _courses) { return(ExecuteScalarInt32Sp("CRM_CourseUpdate", ParamBuilder.Par("ID", _courses.ID), ParamBuilder.Par("PrimaryCourseName", _courses.PrimaryCourseName), ParamBuilder.Par("SecondaryCourseName", _courses.SecondaryCourseName), ParamBuilder.Par("Description", _courses.Description), ParamBuilder.Par("ModifiedBy", _courses.ModifiedBy), ParamBuilder.Par("ModifiedDate", _courses.ModifiedOn))); }
public long ManageCourse_CreateDAL(CRMCourses _Organization) { var parameters = new[] { ParamBuilder.Par("ID", 0) }; return(ExecuteInt64withOutPutparameterSp("CRM_Course_Create", parameters, ParamBuilder.Par("PrimaryCourseName", _Organization.PrimaryCourseName), ParamBuilder.Par("SecondaryCourseName", _Organization.SecondaryCourseName), ParamBuilder.Par("Description", _Organization.Description), ParamBuilder.Par("OrganizationID", _Organization.OrganizationID), ParamBuilder.Par("CreatedBy", _Organization.CreatedBy), ParamBuilder.Par("CreatedDate", _Organization.CreatedDate) )); }
public ActionResult Course_Destroy([DataSourceRequest] DataSourceRequest request, CRMCourses _courses) { if (ModelState.IsValid) { _courses.ModifiedBy = CurrentUser.NameIdentifierInt64; _courses.ModifiedOn = DateTime.Now; var result = _objSaleBAL.Course_DeleteBAL(_courses); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ResourceUpdateValidationError); } } var resultData = new[] { _courses }; return(Json(resultData.AsQueryable().ToDataSourceResult(request, ModelState))); }
public ActionResult ManageCourse_Create([DataSourceRequest] DataSourceRequest request, CRMCourses _objlogmap) { if (ModelState.IsValid) { _objlogmap.CreatedBy = CurrentUser.NameIdentifierInt64; _objlogmap.CreatedDate = DateTime.Now; _objlogmap.OrganizationID = CurrentUser.CompanyID; _objlogmap.ID = _objSaleBAL.ManageCourse_CreateBAL(_objlogmap); //} } var resultData = new[] { _objlogmap }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }
public ActionResult CourseUpdateCRM([DataSourceRequest] DataSourceRequest request, CRMCourses _course) { if (ModelState.IsValid) { var _salesObj = _objSaleBAL.ManageCourse_GetAllBAL(CurrentUser.CompanyID, ""); bool flage = false; foreach (var x in _salesObj) { if (x.PrimaryCourseName == _course.PrimaryCourseName && x.ID != _course.ID) { flage = true; break; } } if (flage) { ModelState.AddModelError(lr.ErrorServerError, lr.ProposedCourseAllreadyExists); } else { _course.ModifiedBy = CurrentUser.NameIdentifierInt64; _course.ModifiedOn = DateTime.Now; var result = _objSaleBAL.CourseUpdateBAL(_course); if (result == -1) { ModelState.AddModelError(lr.ErrorServerError, lr.ErrorServerError); } } } var resultData = new[] { _course }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }
public ActionResult ManageCourse_CreateCRM([DataSourceRequest] DataSourceRequest request, CRMCourses _objlogmap) { if (ModelState.IsValid) { var _salesObj = _objSaleBAL.ManageCourse_GetAllBAL(CurrentUser.CompanyID, ""); bool flage = false; foreach (var x in _salesObj) { if (x.PrimaryCourseName == _objlogmap.PrimaryCourseName) { flage = true; break; } } if (flage) { ModelState.AddModelError(lr.ErrorServerError, lr.ProposedCourseAllreadyExists); } else { _objlogmap.CreatedBy = CurrentUser.NameIdentifierInt64; _objlogmap.CreatedDate = DateTime.Now; _objlogmap.OrganizationID = CurrentUser.CompanyID; _objlogmap.ID = _objSaleBAL.ManageCourse_CreateBAL(_objlogmap); } } var resultData = new[] { _objlogmap }; return(Json(resultData.ToDataSourceResult(request, ModelState))); }
public int Course_DeleteBAL(CRMCourses _Organization) { return(DAL.Course_DeleteDAL(_Organization)); }
public long ManageCourse_CreateBAL(CRMCourses _Organization) { return(DAL.ManageCourse_CreateDAL(_Organization)); }