/// <summary> /// Description : Get Auditors Details from database. /// Created By : Pavan /// Created Date : 23 August 2014 /// Modified By : /// Modified Date: /// </summary> /// <returns></returns> public static List<Auditors> GetAuditorDetailsByWOID(int WOID) { var data = new List<Auditors>(); 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, "[SpGetAuditorDetailsByWOID]", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var Auditors = new Auditors(); Auditors.FetchAuditors(Auditors, safe); data.Add(Auditors); } return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }
/// <summary> /// Description : Get the Group information from CSS1 /// Created By : Shiva /// Created Date : 10 July 2014 /// Modified By : /// Modified Date: /// </summary> /// <returns></returns> public static GroupInfo GetCSS1GroupDetails() { var data = new GroupInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { var lstGroupInfo = new List<GroupInfo>(); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetCSS1GroupDetails"); var safe = new SafeDataReader(reader); while (reader.Read()) { var getGroupInfo = new GroupInfo(); getGroupInfo.FetchGroupInfo(getGroupInfo, safe); lstGroupInfo.Add(getGroupInfo); } data.GroupInfoList = lstGroupInfo; return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }
/// <summary> /// Description : Get WOAddress Details from database. /// Created By : Pavan /// Created Date : 12 August 2014 /// Modified By : /// Modified Date: /// </summary> /// <returns></returns> public static List<WOAddress> GetWOAddressDetails(int PersonID, string PersonSource) { var data = new List<WOAddress>(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[2]; sqlParams[0] = new SqlParameter("@PersonID", PersonID); sqlParams[1] = new SqlParameter("@PersonSource", PersonSource); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "[SpGetWOAddressDetails]", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var woaddress = new WOAddress(); woaddress.FetchwoaddressDetails(woaddress, safe); data.Add(woaddress); } return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }
/// <summary> /// Description : To Get ECE Details by WOID. /// Created By : Shiva /// Created Date : 3rd Sep 2014 /// Modified By : /// Modified Date: /// </summary> /// <returns>ECE Details.</returns> public static WOExistingClientEngaging GetWOECEDetailsByWOID(int WOID) { var WOECEData = new WOExistingClientEngaging(); 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(CSS2.Models.ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SPGetWOECEDetailsByWOID", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { WOECEData.FetchECEDetails(WOECEData, safe); } return WOECEData; } catch (Exception ex) { log.Error("Error: " + ex); return WOECEData; } finally { log.Debug("End: " + methodBase.Name); } }
private WODuplicateDetails FetchWODuplicateDetails(WODuplicateDetails WODuplicateDetails, SafeDataReader dr) { WODuplicateDetails.WOID = dr.GetString("WOID"); WODuplicateDetails.ClassOfShare = dr.GetInt32("ClassOfShare"); return WODuplicateDetails; }
private void FetchVendorDetails(VendorInfo data, SqlDataReader reader, SafeDataReader safe) { System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { //Matched DI Records while (reader.Read()) { var ObjGetVendor = new Vendor(); ObjGetVendor.FetchMatchedVendorDetails(ObjGetVendor, safe); data.MatchedDIList.Add(ObjGetVendor); } //UnMatched DI Records reader.NextResult(); while (reader.Read()) { var ObjGetVendor = new Vendor(); ObjGetVendor.FetchUnMatchedVendorDetails(ObjGetVendor, safe); data.UnMatchedDIList.Add(ObjGetVendor); } //Over Billed reader.NextResult(); while (reader.Read()) { var ObjGetVendor = new Vendor(); ObjGetVendor.FetchMatchedVendorDetails(ObjGetVendor, safe); data.OverBilledList.Add(ObjGetVendor); } //Billed Discrepancy reader.NextResult(); while (reader.Read()) { var ObjGetVendor = new Vendor(); ObjGetVendor.FetchDiscrepancyVendorDetails(ObjGetVendor, safe, false); data.BilledDiscrepancyList.Add(ObjGetVendor); } //Unbilled Discrepancy reader.NextResult(); while (reader.Read()) { var ObjGetVendor = new Vendor(); ObjGetVendor.FetchDiscrepancyVendorDetails(ObjGetVendor, safe, true); data.UnbilledDiscrepancyList.Add(ObjGetVendor); } //Multple Discrepancy reader.NextResult(); while (reader.Read()) { var ObjGetVendor = new Vendor(); ObjGetVendor.FetchMultiDiscrepancyVendorDetails(ObjGetVendor, safe, false); data.MultpleDiscrepancy.Add(ObjGetVendor); } //Method is Use to Calculate Multiple Discripancy ProcessMultipleDiscrepancy(data.MultpleUpdatedDiscrepancy, data.MultpleDiscrepancy); //Error List reader.NextResult(); while (reader.Read()) { var ObjGetVendor = new Vendor(); ObjGetVendor.FetchErrorList(ObjGetVendor, safe); data.ErrorList.Add(ObjGetVendor); } //File Name reader.NextResult(); while (reader.Read()) { data.FileName = Convert.ToString(reader["FileName"]); } } catch (Exception ex) { log.Error("Error: " + ex); } finally { log.Debug("End: " + methodBase.Name); } }
private Vendor FetchUnmatchedVendorDetails(Vendor vendor, SafeDataReader dr) { vendor.VenderReferenceID = dr.GetString("VENDERREFID"); vendor.VendorAmount = dr.GetDecimal("VENDORAMOUNT"); vendor.DI = dr.GetString("DI"); vendor.DIAmount = dr.GetDecimal("DIAMOUNT"); vendor.IsBilled = dr.GetBoolean("BILLED"); vendor.Type = dr.GetString("TYPE"); vendor.VerifyAmount = dr.GetDecimal("VERIFYAMOUNT"); vendor.WOID = dr.GetInt32("WOID"); vendor.ID = dr.GetInt32("ID"); vendor.IsAdhoc = dr.GetInt32("IsAdhoc"); return vendor; }
private Vendor FetchMultiDiscrepancyVendorDetails(Vendor vendor, SafeDataReader dr, bool IsUnbilled) { vendor.VenderReferenceID = dr.GetString("VENDORREF"); vendor.VendorAmount = dr.GetDecimal("VENDORAMOUNT"); vendor.DI = dr.GetString("DI"); vendor.DIRef = dr.GetString("DIREF"); vendor.DIAmount = dr.GetDecimal("DIAMOUNT"); vendor.IsBilled = dr.GetBoolean("BILLED"); vendor.Type = dr.GetString("TYPE"); vendor.Discrepancy = (IsUnbilled ? dr.GetDecimal("UnBilledDiscrepancy") : dr.GetDecimal("Discrepancy")); vendor.VRID = dr.GetInt32("VRID"); vendor.VRDID = dr.GetInt32("VRDID"); vendor.ItemCode = dr.GetString("ItemCode"); vendor.ItemNumber = dr.GetString("ItemNumber"); vendor.Status = dr.GetString("STATUS"); vendor.RowNo = dr.GetInt32("RowNo"); vendor.IsDiscVisible = false; vendor.WOCode = dr.GetString("WOCode"); vendor.InvoiceNumber = dr.GetString("InvoiceNumber"); vendor.ClientName = dr.GetString("ClientName"); vendor.Date = dr.GetString("DATE"); vendor.UsedBy = dr.GetString("SIC"); vendor.GroupName = dr.GetString("GroupName"); return vendor; }
private Vendor FetchErrorList(Vendor vendor, SafeDataReader dr) { vendor.VRID = dr.GetInt32("VRID"); vendor.UploadedOn = dr.GetString("TransationDate"); vendor.Code = dr.GetString("Description"); vendor.VenderReferenceID = dr.GetString("ReferenceNo"); vendor.ItemNumber = dr.GetString("Amount"); return vendor; }
///// <summary> ///// Description : To Check Url Access ///// Created By : Pavan ///// Created Date : 16 September 2014 ///// Modified By : ///// Modified Date : ///// <returns></returns> ///// </summary> //public static int CheckURLAccess(string context, int UserID) //{ // List<string> arr = new List<string>(); // SqlParameter[] sqlParams = new SqlParameter[3]; // sqlParams[0] = new SqlParameter("@UserID", UserID); // sqlParams[1] = new SqlParameter("@RequestedUrl", context); // sqlParams[2] = new SqlParameter("@Output", 0); // sqlParams[2].Direction = ParameterDirection.Output; // var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpCheckURLAccessForUserID", sqlParams); // var safe = new SafeDataReader(reader); // while (reader.Read()) // { // arr.Add(safe.GetString("FieldName")); // } // int output = Convert.ToInt32(sqlParams[2].Value); // return output; //} /// <summary> /// Description : To Check Url Access /// Created By : Pavan /// Created Date : 16 September 2014 /// Modified By : /// Modified Date : /// <returns></returns> /// </summary> public static string CheckURlAndGetUserRole(string context, int UserID) { string Roles = string.Empty; System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { string Result = string.Empty; SqlParameter[] sqlParams = new SqlParameter[2]; sqlParams[0] = new SqlParameter("@UserID", UserID); sqlParams[1] = new SqlParameter("@RequestedUrl", context); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpCheckURLAccessForUserID", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { Result = (safe.GetString("Result")); } string[] output = Result.Split(','); for (int i = 0; i < output.Length; i++) { if (Roles == string.Empty) { Roles = Enum.GetName(typeof(UserType), Convert.ToInt32(output[i])); } else { Roles = Roles + ',' + Enum.GetName(typeof(UserType), Convert.ToInt32(output[i])); } } Roles = Roles.EndsWith(",") ? Roles.Substring(0, Roles.Length - 1) : Roles; } catch (Exception ex) { log.Error("Error: " + ex); } finally { log.Debug("End: " + methodBase.Name); } return Roles; }
/// <summary> /// Description : Get the Client information from CSS1 /// Created By : Sudheer /// Created Date : 14th Oct 2014 /// Modified By : /// Modified Date: /// </summary> public static _ChoosenBillingPartyInfo GetBillingPartyInformation(string ClientName, string WOID) { var GetClientInfo = new _ChoosenBillingPartyInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[2]; sqlParams[0] = new SqlParameter("@WOID", WOID); sqlParams[1] = new SqlParameter("@ClientName", ClientName); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "GetAllBillingPartyDetails", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var ClientInfo = new _ChoosenClient(); ClientInfo.FetchBillingPartyInfo(ClientInfo, safe); GetClientInfo._ChoosenBillingPartyList.Add(ClientInfo); } return GetClientInfo; } catch (Exception ex) { log.Error("Error: " + ex); return GetClientInfo; } finally { log.Debug("End: " + methodBase.Name); } }
private _ChoosenClient FetchClientInfo(_ChoosenClient getClientInfo, SafeDataReader dr) { getClientInfo.ClientCode = dr.GetString("ID"); getClientInfo.ClientName = dr.GetString("Name"); getClientInfo.SourceID = dr.GetString("SourceCode"); getClientInfo.UniqueID = dr.GetInt32("UniqueID"); return getClientInfo; }
public static List<WOTemplateFileDetails> GetDocumentFiles(string @FileIds) { var data = new List<WOTemplateFileDetails>(); tempinfo objtempinfo = new tempinfo(); SqlParameter[] sqlParams = new SqlParameter[1]; sqlParams[0] = new SqlParameter("@FileIds", @FileIds); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "[SpGetDocumentFiles]", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var Template = new WOTemplateFileDetails(); FetchTemplate(Template, safe); data.Add(Template); } return data; }
public static WOTemplateFileDetails FetchTemplate(WOTemplateFileDetails TMapping, SafeDataReader dr) { TMapping.FileName = dr.GetString("FileName"); TMapping.FilePath = dr.GetString("FilePath"); TMapping.IsDefault = dr.GetBoolean("IsDefault"); TMapping.IsMultiple = dr.GetBoolean("IsMultiple"); TMapping.MultipleEntity = dr.GetString("MultipleEntity"); return TMapping; }
private TemplateMapping FetchTemplateSetDetails(TemplateMapping TMapping, SafeDataReader dr) { TMapping.SetID = dr.GetInt32("SetID"); TMapping.SetName = dr.GetString("SetName"); TMapping.FilePath = dr.GetString("FilePath"); return TMapping; }
public VendorInfo InsertVendorRecords(Vendor ObjVendor) { //int result = 0; var data = new VendorInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[6]; sqlParams[0] = new SqlParameter("@tblVendor", SqlDbType.Structured) { Value = ObjVendor.dtvendor }; sqlParams[1] = new SqlParameter("@TBLErrorVENDOR", SqlDbType.Structured) { Value = ObjVendor.dtErrorRec }; sqlParams[2] = new SqlParameter("@Type", ObjVendor.Type); sqlParams[3] = new SqlParameter("@UploadedBy", ObjVendor.UploadedBy); sqlParams[4] = new SqlParameter("@RecordCount", ObjVendor.RecordCount); sqlParams[5] = new SqlParameter("@FileName", ObjVendor.Name); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpInsertVendorDetails", sqlParams); // reader.NextResult(); var safe = new SafeDataReader(reader); while (reader.Read()) { data.IsAlreadyUploaded = Convert.ToString(reader["IsAlreadyUplaoded"]); } reader.NextResult(); FetchVendorDetails(data, reader, safe); return data; } catch (Exception ex) { log.Error("Error: " + ex); data.ExceptionMessage = "exception"; return data; } finally { log.Debug("End: " + methodBase.Name); } }
public VendorInfo UplateMultipleDiscrepancy(Vendor objVd) { var data = new VendorInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[4]; sqlParams[0] = new SqlParameter("@tblVendor", SqlDbType.Structured) { Value = objVd.dtvendor }; sqlParams[1] = new SqlParameter("@VRID", objVd.VRID); sqlParams[2] = new SqlParameter("@CreatedBy", objVd.UploadedBy); sqlParams[3] = new SqlParameter("@Action", objVd.Name); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpUpdate_MultiBilled_Discrepancy", sqlParams); // reader.NextResult(); var safe = new SafeDataReader(reader); FetchVendorDetails(data, reader, safe); return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }
/// <summary> /// Description : To Bind Menu Data /// Created By : Pavan /// Created Date : 15 September 2014 /// Modified By : /// Modified Date : /// <returns></returns> /// </summary> public static List<Menu> GetMenuDataForUser(int UserID) { var data = new List<Menu>(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { MenuBindingInfo objMenu = new MenuBindingInfo(); SqlParameter[] sqlParams = new SqlParameter[1]; sqlParams[0] = new SqlParameter("@UserID", UserID); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpBindMenu", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var Menudata = new MenuBinding(); Menudata.FetchMenu(Menudata, safe); objMenu.MenuList.Add(Menudata); } FetchMenuToBind(objMenu, data); } catch (Exception ex) { log.Error("Error: " + ex); } finally { log.Debug("End: " + methodBase.Name); } return data; }
private Vendor FetchMatchedVendorDetails(Vendor vendor, SafeDataReader dr) { vendor.VenderReferenceID = dr.GetString("VENDORREF"); vendor.VendorAmount = dr.GetDecimal("VENDORAMOUNT"); vendor.DI = dr.GetString("DI"); vendor.DIRef = dr.GetString("DIREF"); vendor.DIAmount = dr.GetDecimal("DIAMOUNT"); vendor.IsBilled = dr.GetBoolean("BILLED"); vendor.Type = dr.GetString("TYPE"); vendor.IsVerified = dr.GetBoolean("ISVERIFIED"); vendor.VRID = dr.GetInt32("VRID"); vendor.VRDID = dr.GetInt32("VRDID"); vendor.ItemCode = dr.GetString("ItemCode"); vendor.ItemNumber = dr.GetString("ItemNumber"); vendor.WOCode = dr.GetString("WOCode"); vendor.InvoiceNumber = dr.GetString("InvoiceNumber"); vendor.ClientName = dr.GetString("ClientName"); vendor.Date = dr.GetString("DATE"); vendor.UsedBy = dr.GetString("SIC"); vendor.GroupName = dr.GetString("GroupName"); return vendor; }
private MenuBinding FetchMenu(MenuBinding MenuBinding, SafeDataReader dr) { MenuBinding.MainMenuID = dr.GetString("MainMenuID"); MenuBinding.MainMenuClass = dr.GetString("MainMenuClass"); MenuBinding.MainMenuName = dr.GetString("MainMenuName"); MenuBinding.SubMenuID = dr.GetString("SubMenuID"); MenuBinding.SubMenuName = dr.GetString("SubMenuName"); MenuBinding.URL = dr.GetString("URL"); return MenuBinding; }
private Vendor FetchService(Vendor vendor, SafeDataReader dr) { vendor.Type = dr.GetString("Type"); vendor.UploadedOn = dr.GetString("UploadedOn"); vendor.Username = dr.GetString("Name"); vendor.VRID = dr.GetInt32("VRID"); vendor.Name = dr.GetString("FileName"); return vendor; }
private Vendor FetchVendorReportType(Vendor vendor, SafeDataReader dr) { vendor.Code = dr.GetString("Code"); vendor.Name = dr.GetString("Name"); return vendor; }
private Vendor FetchUnMatchedVendorDetails(Vendor vendor, SafeDataReader dr) { vendor.Date = dr.GetString("TransactionDate"); vendor.UsedBy = dr.GetString("UsedBy"); vendor.Description = dr.GetString("Description"); vendor.VenderReferenceID = dr.GetString("VENDORREF"); vendor.VendorAmount = dr.GetDecimal("VENDORAMOUNT"); vendor.VRID = dr.GetInt32("VRID"); vendor.VRDID = dr.GetInt32("VRDID"); return vendor; }
private Vendor FetchVendorReportType1(Vendor vendor, SafeDataReader dr) { vendor.Code = dr.GetString("Code"); vendor.Name = dr.GetString("Name"); vendor.Username = dr.GetString("Username"); vendor.UploadedOn = dr.GetString("UploadedOn"); return vendor; }
/// <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); } }
public static VendorInfo GetAllVendorDetails(int startPage, int resultPerPage, string OrderBy,string FromDate,string ToDate) { var data = new VendorInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[5]; sqlParams[0] = new SqlParameter("@startPage", startPage); sqlParams[1] = new SqlParameter("@resultPerPage", resultPerPage); sqlParams[2] = new SqlParameter("@OrderBy", OrderBy); sqlParams[3] = new SqlParameter("@FromDate", HelperClasses.ConvertDateFormat(FromDate)); sqlParams[4] = new SqlParameter("@ToDate", HelperClasses.ConvertDateFormat(ToDate)); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "[SpGetAllVendors]", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var vendor = new Vendor(); vendor.FetchService(vendor, safe); data.VendorList.Add(vendor); data.VendorCount = Convert.ToInt32(reader["VendorCount"]); } return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }
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; }
/// <summary> /// Description : To Get Vendor Upload Details By Type /// Created By : Pavan /// Created Date : 6 FEB 2015 /// Modified By : /// Modified Date: /// </summary> public static VendorInfo SpGetVendorUploadedDetailsByType(string Type) { var data = new VendorInfo(); 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("@Type", Type); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "[SpGetVendorUploadedDetailsByType]", sqlParams); var safe = new SafeDataReader(reader); while (reader.Read()) { var vendor = new Vendor(); vendor.FetchVendorReportType1(vendor, safe); data.VendorList.Add(vendor); } return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }
private WOExistingClientEngaging FetchECEDetails(WOExistingClientEngaging ECEData, SafeDataReader dr) { ECEData.Currency = dr.GetInt32("Currency"); ECEData.ClassOfShare = dr.GetInt32("ClassOfShare"); ECEData.NewAllottedShares = dr.GetString("NewAllottedShares"); ECEData.EachShare = dr.GetString("ConsiderationOfEachShare"); ECEData.AmountPaidToEachShare = dr.GetString("AmountPaidToEachShare"); ECEData.TotalConsideration = dr.GetString("TotalConsideration"); ECEData.NoOfIssuedShares = dr.GetString("ResultantNoOfIssuedShares"); ECEData.IssuedCapital = dr.GetString("IssuedCapital"); ECEData.MeetingNoticeSource = dr.GetString("MeetingNoticeSource"); ECEData.MeetingNotice = dr.GetInt32("MeetingNotice"); ECEData.MeetingMinutesSource = dr.GetString("MeetingMinutesSource"); ECEData.MeetingMinutes = dr.GetInt32("MeetingMinutes"); ECEData.OthersMeetingMinutes = dr.GetString("OthersMeetingMinutes"); ECEData.Designation = dr.GetString("Designation"); ECEData.NoticeResolutionSource = dr.GetString("NoticeResolutionSource"); ECEData.NoticeResolution = dr.GetInt32("NoticeResolution"); ECEData.F24F25Source = dr.GetString("F24F25Source"); ECEData.F24F25ID = dr.GetInt32("F24F25ID"); ECEData.ShareHoldingStructure = dr.GetInt32("ShareHoldingStructure"); ECEData.ResultantPaidupCapital = dr.GetString("ResultantPaidupCapital"); ECEData.IsROPlaceOfMeeting = dr.GetBoolean("IsROPlaceOfMeeting"); ECEData.MAddressLine1 = dr.GetString("MeetingAddressLine1"); ECEData.MAddressLine2 = dr.GetString("MeetingAddressLine2"); ECEData.MAddressLine3 = dr.GetString("MeetingAddressLine3"); ECEData.MAddressCountry = dr.GetInt32("MAddressCountry"); ECEData.MAddressPostalCode = dr.GetString("MPostalCode"); return ECEData; }
public VendorInfo getVendorUploadedDetails(Vendor ObjVendor) { //int result = 0; var data = new VendorInfo(); System.Diagnostics.StackFrame stackFrame = new System.Diagnostics.StackFrame(); System.Reflection.MethodBase methodBase = stackFrame.GetMethod(); log.Debug("Start: " + methodBase.Name); try { SqlParameter[] sqlParams = new SqlParameter[4]; sqlParams[0] = new SqlParameter("@VRID", ObjVendor.VRID); sqlParams[1] = new SqlParameter("@GroupName", ObjVendor.GroupName); sqlParams[2] = new SqlParameter("@VENDORREF", ObjVendor.VenderReferenceID); sqlParams[3] = new SqlParameter("@ClientName", ObjVendor.ClientName); var reader = SqlHelper.ExecuteReader(ConnectionUtility.GetConnectionString(), CommandType.StoredProcedure, "SpGetVendorUploadDetails", sqlParams); // reader.NextResult(); var safe = new SafeDataReader(reader); FetchVendorDetails(data, reader, safe); return data; } catch (Exception ex) { log.Error("Error: " + ex); return data; } finally { log.Debug("End: " + methodBase.Name); } }