当前位置: 首页>>代码示例>>C#>>正文


C# Models.SafeDataReader类代码示例

本文整理汇总了C#中CSS2.Models.SafeDataReader的典型用法代码示例。如果您正苦于以下问题:C# SafeDataReader类的具体用法?C# SafeDataReader怎么用?C# SafeDataReader使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


SafeDataReader类属于CSS2.Models命名空间,在下文中一共展示了SafeDataReader类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetAuditorDetailsByWOID

            /// <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);
                }
            }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:39,代码来源:Masters.cs

示例2: GetCSS1GroupDetails

        /// <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);
            }
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:39,代码来源:WorkOrders.cs

示例3: GetWOAddressDetails

        /// <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);
            }
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:40,代码来源:WOAddress.cs

示例4: GetWOECEDetailsByWOID

        /// <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);
            }
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:38,代码来源:WOExistingClientEngaging.cs

示例5: FetchWODuplicateDetails

 private WODuplicateDetails FetchWODuplicateDetails(WODuplicateDetails WODuplicateDetails, SafeDataReader dr)
 {
     WODuplicateDetails.WOID = dr.GetString("WOID");
     WODuplicateDetails.ClassOfShare = dr.GetInt32("ClassOfShare");
     return WODuplicateDetails;
 }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:6,代码来源:WODuplicateDetails.cs

示例6: FetchVendorDetails

        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);
            }
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:91,代码来源:Vendor.cs

示例7: FetchUnmatchedVendorDetails

 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;
 }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:14,代码来源:Vendor.cs

示例8: FetchMultiDiscrepancyVendorDetails

 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;
 }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:25,代码来源:Vendor.cs

示例9: FetchErrorList

 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;
 }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:9,代码来源:Vendor.cs

示例10: CheckURlAndGetUserRole

        ///// <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;
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:77,代码来源:MenuBinding.cs

示例11: GetBillingPartyInformation

        /// <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);
            }
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:41,代码来源:_ChoosenClient.cs

示例12: FetchClientInfo

        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;
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:9,代码来源:_ChoosenClient.cs

示例13: GetDocumentFiles

        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;
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:19,代码来源:TemplateMapping.cs

示例14: FetchTemplate

        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;
        }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:10,代码来源:TemplateMapping.cs

示例15: FetchTemplateSetDetails

 private TemplateMapping FetchTemplateSetDetails(TemplateMapping TMapping, SafeDataReader dr)
 {
     TMapping.SetID = dr.GetInt32("SetID");
     TMapping.SetName = dr.GetString("SetName");
     TMapping.FilePath = dr.GetString("FilePath");
     return TMapping;
 }
开发者ID:reddyjannavarapu,项目名称:css3,代码行数:7,代码来源:TemplateMapping.cs


注:本文中的CSS2.Models.SafeDataReader类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。