public HttpResponseMessage PostUpdateMemberProfile(AgencyAdminInfo objAgentStepA) { AgencyDAL _objAgencyDAL = new AgencyDAL(); Response objResponse = new Response(); MemberRegistration _objNewMemberRegt = new MemberRegistration(); try { var jsonResult = new StringBuilder(); jsonResult = _objAgencyDAL.SetMemberProfile(objAgentStepA); objResponse.Data = jsonResult.ToString(); if (!string.IsNullOrEmpty(jsonResult.ToString()) && jsonResult.ToString() != "-2000") { objResponse.Success = true; } else { objResponse.Success = false; } return(Request.CreateResponse(HttpStatusCode.OK, objResponse)); } catch (Exception ex) { #region set exception response string logMsg = Environment.NewLine + DateTime.Now + Environment.NewLine + "Method Name: UpdateMemberProfile | Contoller Name: Agency Controller" + Environment.NewLine; logMsg += "Temp Reg ID:" + objAgentStepA.TmpAgencyID + "|" + DateTime.Now + "|" + ex.ToString() + "-" + Environment.NewLine; ErrorHandler.ErrorLog(logMsg); #endregion objResponse.Success = false; HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.BadRequest, objResponse); return(response); } }
public StringBuilder SetAgencyAdminInfoStep3DAL(AgencyAdminInfo agencyAdminInfo) { try { SqlParameter[] P = new SqlParameter[] { new SqlParameter("@TmpAgencyID", Convert.ToInt64(agencyAdminInfo.TmpAgencyID)), new SqlParameter("@FirstName", agencyAdminInfo.FirstName), new SqlParameter("@LastName", agencyAdminInfo.LastName), new SqlParameter("@Email", agencyAdminInfo.Email), new SqlParameter("@EmployeeCode", agencyAdminInfo.EmployeeCode), new SqlParameter("@MobileNo", agencyAdminInfo.MobileNo), }; var jsonResult = new StringBuilder(); jsonResult = DataLib.JsonStringExecuteReader(DataLib.Connection.SetConnectionString, SPKeys.SPSetTmpAgencyAdminInfo, P); return(jsonResult); } catch { throw; } }
public StringBuilder SetSetNewAgencyAdminDAL(AgencyAdminInfo agencyInfo) { try { SqlParameter[] P = new SqlParameter[] { new SqlParameter("@AgencyID", agencyInfo.TmpAgencyID), new SqlParameter("@Email", agencyInfo.Email), new SqlParameter("@EmployeeCode", agencyInfo.EmployeeCode), new SqlParameter("@FirstName", agencyInfo.FirstName), new SqlParameter("@LastName", agencyInfo.LastName), new SqlParameter("@Mobile", agencyInfo.MobileNo), new SqlParameter("@CreatedBy", agencyInfo.CreatedBy), }; var jsonResult = new StringBuilder(); jsonResult = DataLib.JsonStringExecuteReader(DataLib.Connection.SetConnectionString, SPKeys.SPSetAgencykeypersonUpdate, P); return(jsonResult); } catch { throw; } }
public StringBuilder SetMemberProfile(AgencyAdminInfo objAgentStepA) { try { SqlParameter[] P = new SqlParameter[] { new SqlParameter("@AgencyBranchID", objAgentStepA.TmpAgencyID), new SqlParameter("@FirstName", objAgentStepA.FirstName), new SqlParameter("@LastName", String.IsNullOrEmpty(objAgentStepA.LastName)?DBNull.Value:(object)objAgentStepA.LastName), new SqlParameter("@Mobile", String.IsNullOrEmpty(objAgentStepA.MobileNo)?DBNull.Value:(object)objAgentStepA.MobileNo), new SqlParameter("@Email", String.IsNullOrEmpty(objAgentStepA.Email)?DBNull.Value:(object)objAgentStepA.Email), new SqlParameter("@employeeCode", String.IsNullOrEmpty(objAgentStepA.EmployeeCode)?DBNull.Value:(object)objAgentStepA.EmployeeCode), new SqlParameter("@CreatedBy", String.IsNullOrEmpty(objAgentStepA.CreatedBy)?DBNull.Value:(object)objAgentStepA.CreatedBy), }; var jsonResult = new StringBuilder(); jsonResult = DataLib.JsonStringExecuteReader(DataLib.Connection.SetConnectionString, SPKeys.SPSetNewAgencyBranchAdmin, P); return(jsonResult); } catch { throw; } }