private WODuplicateDetails FetchWODuplicateShareHoldersDetails(WODuplicateDetails WODuplicateDetails, SafeDataReader dr) { WODuplicateDetails.ID = dr.GetInt32("ID"); WODuplicateDetails.Name = dr.GetString("Name"); WODuplicateDetails.CertNo = dr.GetString("CertNo"); WODuplicateDetails.NoofShares = dr.GetString("NoofShares"); //if NULL Displaying as "" in UI WODuplicateDetails.DateOfIssue = dr.GetDateTime("DateOfIssue") == default(DateTime) ? string.Empty : dr.GetDateTime("DateOfIssue").ToString("dd/MM/yy"); WODuplicateDetails.NoOfNewCertToBeIssued = dr.GetInt32("NoOfNewCertToBeIssued"); return WODuplicateDetails; }
private WODuplicateDetails FetchWODuplicateDetails(WODuplicateDetails WODuplicateDetails, SafeDataReader dr) { WODuplicateDetails.WOID = dr.GetString("WOID"); WODuplicateDetails.ClassOfShare = dr.GetInt32("ClassOfShare"); return WODuplicateDetails; }
/// <summary> /// Created By : Pavan /// Created Date : 4 November 2014 /// Modified By : /// Modified Date: /// Description : Get WODuplicate ShareHolders details by WOID /// </summary> /// <returns></returns> public static WODupluicateDetailsInfo GetWODuplicateShareHoldersDetailsByWOID(int WOID) { var Details = new WODupluicateDetailsInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[1]; sqlParams[0] = new SqlParameter("@WOID", WOID); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetWODuplicateShareholdersDetailsByWOID", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var data = new WODuplicateDetails(); data.FetchWODuplicateShareHoldersDetails(data, safe); Details.WODuplicateList.Add(data); } return Details; } catch (Exception ex) { log.Error("Error: " + ex); return Details; } finally { log.Debug("End: " + methodBase.Name); } }
/// <summary> /// Description : To Insert Work Order Duplicate Details. /// Created By : Pavan /// Created Date : 3 Sepember 2014 /// Modified By : /// Modified Date: /// </summary> /// <returns></returns> public static int InsertWODuplicateDetails(WODuplicateDetails WODuplicateDetails, int CreatedBy) { int output = -2; System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[3]; sqlParams[0] = new SqlParameter("@WOID", WODuplicateDetails.WOID); sqlParams[1] = new SqlParameter("@ClassOfShare", WODuplicateDetails.ClassOfShare); sqlParams[2] = new SqlParameter("@CreatedBy", CreatedBy); output = SqlHelper.ExecuteNonQuery(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "[SpInsertOrUpdateWODuplicateDetails]", sqlParams); return output; } catch (Exception ex) { log.Error("Error: " + ex); return output; } finally { log.Debug("End: " + methodBase.Name); } }
public JsonResult InsertWODuplicateDetails(WODuplicateDetails WODuplicateDetails) { System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { int checkSession = UserLogin.AuthenticateRequest(); if (checkSession == 0) { return Json(checkSession); } else { int result = WODuplicateDetails.InsertWODuplicateDetails(WODuplicateDetails, checkSession); return Json(result); } } catch (Exception ex) { log.Error("Error: " + ex); return Json(""); } finally { log.Debug("End: " + methodBase.Name); } }