public async Task updateLeadDetailsAsync(LeadInfoDTO leadDetails) { try { var query = "UpdateLeadDetails"; var param = new DynamicParameters(); param.Add("@leadId", leadDetails.leadId); param.Add("@leadName", leadDetails.leadName); param.Add("@leadPipeLineId", leadDetails.pipeId); param.Add("@leadStageId", leadDetails.stageId); param.Add("@leadValue", leadDetails.leadValue); param.Add("@userid", leadDetails.createdBy); param.Add("@updateFlag", leadDetails.updateFlag); await Connection.ExecuteScalarAsync <object>(query, param, commandType : CommandType.StoredProcedure, transaction : Transaction); } catch (Exception ex) { throw ex; } }
public async Task <string> AddUpdateLeadAsync(LeadInfoDTO _obj) { try { var query = "ADDLEADS"; var param = new DynamicParameters(); param.Add("@LeadsId", _obj.leadId); param.Add("@LEADNAME", _obj.leadName); param.Add("@leadvalue", Convert.ToDecimal(_obj.leadValue)); param.Add("@ASSIGNUSER", _obj.assignUser); param.Add("@PIPEID", _obj.pipeId); param.Add("@STAGEID", _obj.stageId); param.Add("@CREATEDBY", _obj.createdBy); param.Add("@ORGID", _obj.orgId); object Result = await Connection.ExecuteScalarAsync <object>(query, param, commandType : CommandType.StoredProcedure, transaction : Transaction); return(Result.ToString()); } catch (Exception ex) { throw ex; } }