Ejemplo n.º 1
0
        public bool UpdateActiveInActive(UserMaster _user)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ID", _user.ID),
                new SqlParameter("@IsActive", _user.IsActive),
            };

            return(SqlDBHelper.ExecuteNonQuery("proc_UserMaster_UpdateActiveInactive", CommandType.StoredProcedure, parameters));
        }
Ejemplo n.º 2
0
        public DataTable GetResultByRunID(long RunID)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@RunID", RunID)
            };
            DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwAPIRuleApplicationSummary_GetResultByRunID", CommandType.StoredProcedure, parameters);

            return(table);
        }
Ejemplo n.º 3
0
        public List <RuleDesc> GetRuleDescDetailsByIDs(string IDs)
        {
            List <RuleDesc> list = null;

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@IDs", IDs)
            };
            using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleDesc_LoadByIDs", CommandType.StoredProcedure, parameters))
            {
                if (table.Rows.Count > 0)
                {
                    list = new List <RuleDesc>();

                    foreach (DataRow row in table.Rows)
                    {
                        RuleDesc _rule = new RuleDesc();

                        // DataRow row = table.Rows[0];
                        _rule              = new RuleDesc();
                        _rule.ID           = Convert.ToInt32(row["ID"]);
                        _rule.RuleName     = row["RuleName"].ToString();
                        _rule.EntryDate    = Convert.ToDateTime(row["EntryDate"]);
                        _rule.IsActive     = Convert.ToBoolean(row["IsActive"]);
                        _rule.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]);


                        _rule.RuleMastID = Convert.ToInt32(row["RuleMastID"]);

                        _rule.SplitAs               = Convert.ToString(row["SplitAs"]);
                        _rule.Dictionary            = Convert.ToString(row["Dictionary"]);
                        _rule.OriginalDocumentName  = Convert.ToString(row["OriginalDocumentName"]);
                        _rule.ConvertedDocumentName = Convert.ToString(row["ConvertedDocumentName"]);

                        _rule.NeighbourhoodCount = Convert.ToInt32(row["NeighbourhoodCount"]);
                        _rule.ContextWord        = Convert.ToString(row["ContextWord"]);
                        _rule.Operator           = Convert.ToString(row["Operator"]);
                        _rule.FieldName          = Convert.ToString(row["FieldName"]);
                        _rule.FieldValue         = Convert.ToString(row["FieldValue"]);
                        _rule.Expression1        = Convert.ToString(row["Expression1"]);
                        _rule.Expression2        = Convert.ToString(row["Expression2"]);

                        _rule.ExpressionContext = Convert.ToString(row["ExpressionContext"]);
                        _rule.IsIgnoreKeyword   = Convert.ToBoolean(row["IsIgnoreKeyword"]);
                        _rule.IsCheckSynonyms   = Convert.ToBoolean(row["IsCheckSynonyms"]);
                        _rule.FieldPosition     = Convert.ToString(row["FieldPosition"]);
                        _rule.Synonyms          = Convert.ToString(row["Synonyms"]);

                        list.Add(_rule);
                    }
                }
            }

            return(list);
        }
        public List <vwClassDetails> GetClassMasterListByQuoteID(int quoteID)
        {
            List <vwClassDetails> list = null;

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@QuoteID", quoteID)
            };

            using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwClassDetails_GetAllByQuoteID", CommandType.StoredProcedure, parameters))
            {
                if (table.Rows.Count > 0)
                {
                    list = new List <vwClassDetails>();

                    foreach (DataRow row in table.Rows)
                    {
                        vwClassDetails _clsDtls = new vwClassDetails();

                        _clsDtls.ID                 = Convert.ToInt32(row["ID"]);
                        _clsDtls.Class              = row["Class"].ToString();
                        _clsDtls.Full_Description   = row["Full_Description"].ToString();
                        _clsDtls.Zip                = Convert.ToInt32(row["Zip"]);
                        _clsDtls.Quote_ID           = Convert.ToInt32(row["Quote_ID"]);
                        _clsDtls.StateID            = Convert.ToInt32(row["StateID"]);
                        _clsDtls.Territory          = row["Territory"].ToString();
                        _clsDtls.ClassID            = Convert.ToInt32(row["ClassID"]);
                        _clsDtls.Exposure           = Convert.ToInt32(row["Exposure"]);
                        _clsDtls.Cov_Premises       = Convert.ToBoolean(row["Cov_Premises"]);
                        _clsDtls.Cov_Product        = Convert.ToBoolean(row["Cov_Product"]);
                        _clsDtls.Territory_ID       = Convert.ToInt32(row["Territory_ID"]);
                        _clsDtls.TerritoryDetails   = row["TerritoryDetails"].ToString();
                        _clsDtls.TerritoryType      = row["TerritoryType"].ToString();
                        _clsDtls.Insured_Name       = row["Insured_Name"].ToString();
                        _clsDtls.Mailing_Address1   = row["Mailing_Address1"].ToString();
                        _clsDtls.Mailing_Address2   = row["Mailing_Address2"].ToString();
                        _clsDtls.ZipCode            = Convert.ToInt32(row["ZipCode"]);
                        _clsDtls.City               = row["City"].ToString();
                        _clsDtls.Insured_State_ID   = Convert.ToInt32(row["Insured_State_ID"]);
                        _clsDtls.Home_State_ID      = Convert.ToInt32(row["Home_State_ID"]);
                        _clsDtls.Is_new_business    = Convert.ToBoolean(row["Is_new_business"]);
                        _clsDtls.Years_Without_Loss = Convert.ToInt32(row["Years_Without_Loss"]);
                        _clsDtls.Effective_Date     = Convert.ToDateTime(row["Effective_Date"]);
                        _clsDtls.Expiration_Date    = Convert.ToDateTime(row["Expiration_Date"]);
                        _clsDtls.UserID             = Convert.ToInt32(row["UserID"]);
                        _clsDtls.QuoteStatus        = row["QuoteStatus"].ToString();
                        _clsDtls.QuoteNo            = row["QuoteNo"].ToString();

                        list.Add(_clsDtls);
                    }
                }
            }

            return(list);
        }
Ejemplo n.º 5
0
        public vwProperty GetDetailsByQuoteNo(string quoteNo)
        {
            vwProperty _Property = null;

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@QuoteNo", quoteNo)
            };

            using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_vwProperty_GetAllByQuoteID", CommandType.StoredProcedure, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count == 1)
                {
                    DataRow row = table.Rows[0];


                    _Property = new vwProperty();

                    _Property.ID                   = Convert.ToInt32(row["ID"]);
                    _Property.QuoteID              = Convert.ToInt32(row["QuoteID"]);
                    _Property.Address1             = Convert.ToString(row["Address1"]);
                    _Property.Address2             = Convert.ToString(row["Address2"]);
                    _Property.Zip                  = Convert.ToInt32(row["Zip"]);
                    _Property.City                 = Convert.ToString(row["City"]);
                    _Property.StateID              = Convert.ToInt32(row["StateID"]);
                    _Property.ProtectionClass      = Convert.ToInt32(row["ProtectionClass"]);
                    _Property.ClassID              = Convert.ToInt32(row["ClassID"]);
                    _Property.StructureDescription = Convert.ToString(row["StructureDescription"]);
                    _Property.ConstructionType     = Convert.ToString(row["ConstructionType"]);
                    _Property.ConstType_ApplySpriniderSafeguardP1 = Convert.ToBoolean(row["ConstType_ApplySpriniderSafeguardP1"]);
                    _Property.ConstType_ExcludeWindHall           = Convert.ToBoolean(row["ConstType_ExcludeWindHall"]);
                    _Property.HigherWindHall         = Convert.ToString(row["HigherWindHall"]);
                    _Property.YearBuilt              = Convert.ToInt32(row["YearBuilt"]);
                    _Property.LastCompleteUpdateYear = Convert.ToInt32(row["LastCompleteUpdateYear"]);
                    _Property.Plumbing          = Convert.ToString(row["Plumbing"]);
                    _Property.Rooting           = Convert.ToString(row["Rooting"]);
                    _Property.Wiring            = Convert.ToString(row["Wiring"]);
                    _Property.Coverage_Building = Convert.ToBoolean(row["Coverage_Building"]);
                    _Property.Coverage_BusinessPersonalProperty = Convert.ToBoolean(row["Coverage_BusinessPersonalProperty"]);
                    _Property.Coverage_BusinessIncome           = Convert.ToBoolean(row["Coverage_BusinessIncome"]);
                    _Property.Coverage_PersonalPropertyofOthers = Convert.ToBoolean(row["Coverage_PersonalPropertyofOthers"]);
                    _Property.Coverage_Signs          = Convert.ToBoolean(row["Coverage_Signs"]);
                    _Property.Coverage_PropertyInOpen = Convert.ToBoolean(row["Coverage_PropertyInOpen"]);
                    _Property.Class            = Convert.ToString(row["Class"]);
                    _Property.Full_Description = Convert.ToString(row["Full_Description"]);
                    _Property.Insured_Name     = Convert.ToString(row["Insured_Name"]);
                    _Property.QuoteNo          = Convert.ToString(row["QuoteNo"]);
                    _Property.QuoteStatus      = Convert.ToString(row["QuoteStatus"]);
                    _Property.StateName        = Convert.ToString(row["StateName"]);
                }
            }

            return(_Property);
        }
Ejemplo n.º 6
0
 public bool AddNew(RuleMast _rule)
 {
     SqlParameter[] parameters = new SqlParameter[]
     {
         new SqlParameter("@RuleName", _rule.RuleName),
         new SqlParameter("@CreateDate", _rule.CreateDate),
         new SqlParameter("@ModifiedDate", _rule.ModifiedDate),
         new SqlParameter("@IsActive", _rule.IsActive),
     };
     return(SqlDBHelper.ExecuteNonQuery("proc_RuleMast_AddNew", CommandType.StoredProcedure, parameters));
 }
Ejemplo n.º 7
0
 /// <summary>
 /// 新增角色权限表
 /// </summary>
 /// <param name="sql"></param>
 /// <returns></returns>
 public int AddPer(string sql)
 {
     if (SqlDBHelper.ADU(sql))
     {
         return(1);
     }
     else
     {
         return(2);
     }
 }
Ejemplo n.º 8
0
 internal int addOrder(Order order, List <OrderItems> listItems)
 {
     try
     {
         SqlParameter[] parameters = new SqlParameter[]
         {
             new SqlParameter("@pOrderDate", order.OrderDate),
             new SqlParameter("@pBillToContact", order.BillToContact),
             new SqlParameter("@pBillToGSTN", order.BillToGSTN),
             new SqlParameter("@pBillToEmail", order.BillToEmail),
             new SqlParameter("@pBillToPhone", order.BillToPhone),
             new SqlParameter("@pBillToAddress1", order.BillToAddress1),
             new SqlParameter("@pBillToAddress2", order.BillToAddress2),
             new SqlParameter("@pBillToCity", order.BillToCity),
             new SqlParameter("@pBillToState", order.BillToState),
             new SqlParameter("@pBillToZip", order.BillToZip),
             new SqlParameter("@pDiscount", order.Discount),
             new SqlParameter("@pCGSTRate", order.CGSTRate),
             new SqlParameter("@pSGSTRate", order.SGSTRate),
             new SqlParameter("@pIGSTRate", order.IGSTRate),
             new SqlParameter("@pTaxablePrice", order.TaxablePrice),
             new SqlParameter("@pTotalProductPrice", order.TotalProductPrice),
             new SqlParameter("@pGrandtotal", order.Grandtotal),
             new SqlParameter("@GrandtotalInWords", order.GrandtotalInWords),
             new SqlParameter("@pCreatedBy", 1)
         };
         order.OrderId = Convert.ToInt32(SqlDBHelper.ExecuteNonQueryReturnData("app_AddOrder", CommandType.StoredProcedure, parameters, "pOrderId"));
         if (order.OrderId != null)
         {
             if (listItems.Count() > 0)
             {
                 foreach (OrderItems item in listItems)
                 {
                     SqlParameter[] param = new SqlParameter[]
                     {
                         new SqlParameter("@pOrderId", order.OrderId),
                         new SqlParameter("@pMaterialId", item.MaterialId),
                         new SqlParameter("@pMaterialName", item.MaterialName),
                         new SqlParameter("@pHSNCode", item.HSNCode),
                         new SqlParameter("@pQuantity", item.Quantity),
                         new SqlParameter("@pUnitPrice", item.UnitPrice),
                         new SqlParameter("@pTotalPrice", item.TotalPrice)
                     };
                     SqlDBHelper.ExecuteNonQuery("app_AddOrderItems", CommandType.StoredProcedure, param);
                 }
             }
         }
         return(order.OrderId);
     }
     catch (Exception ex)
     {
         return(0);
     }
 }
Ejemplo n.º 9
0
 public bool AddNew(APICallHistory _history)
 {
     SqlParameter[] parameters = new SqlParameter[]
     {
         new SqlParameter("@RunTime", _history.RunTime),
         new SqlParameter("@Comment", _history.Comment),
         new SqlParameter("@Status", _history.Status),
         new SqlParameter("@RunID", _history.RunID),
     };
     return(SqlDBHelper.ExecuteNonQuery("proc_APICallHistory_AddNew", CommandType.StoredProcedure, parameters));
 }
Ejemplo n.º 10
0
        public int SelectCount(engage_interviewModel e)
        {
            string sql = string.Format(@"select max(interview_amount)  from [dbo].[engage_interview] where [human_name]='{0}'", e.human_name);
            string max = SqlDBHelper.DGZ(sql).ToString();

            if (max == "")
            {
                return(1);
            }
            return(int.Parse(max));
        }
        public bool Update(Configuration _config)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ID", _config.ID),
                new SqlParameter("@ConfigurationValue", _config.ConfigurationValue),
                new SqlParameter("@ModifiedDate", _config.ModifiedDate),
            };

            return(SqlDBHelper.ExecuteNonQuery("proc_Configuration_Update", CommandType.StoredProcedure, parameters));
        }
Ejemplo n.º 12
0
        public QuoteDetails GetQuotesByNumber(string quoteNo)
        {
            QuoteDetails _quote = null;

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@QuoteNo", quoteNo)
            };

            using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_QuoteDetails_LoadByQuoteNo", CommandType.StoredProcedure, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count == 1)
                {
                    DataRow row = table.Rows[0];


                    _quote = new QuoteDetails();

                    _quote.ID = Convert.ToInt32(row["ID"]);
                    _quote.Mailing_Address1 = Convert.ToString(row["Mailing_Address1"]);
                    _quote.Mailing_Address2 = Convert.ToString(row["Mailing_Address2"]);
                    _quote.ZipCode          = Convert.ToInt32(row["ZipCode"]);
                    _quote.City             = Convert.ToString(row["City"]);

                    _quote.Is_new_business            = Convert.ToBoolean(row["Is_new_business"]);
                    _quote.Years_Without_Loss         = Convert.ToInt32(row["Years_Without_Loss"]);
                    _quote.Effective_Date             = Convert.ToDateTime(row["Effective_Date"]);
                    _quote.Expiration_Date            = Convert.ToDateTime(row["Expiration_Date"]);
                    _quote.LOB_GeneralLiability       = Convert.ToBoolean(row["LOB_GeneralLiability"]);
                    _quote.LOB_VacantBuildingGL       = Convert.ToBoolean(row["LOB_VacantBuildingGL"]);
                    _quote.LOB_Owners                 = Convert.ToBoolean(row["LOB_Owners"]);
                    _quote.LOB_SpecialEvent           = Convert.ToBoolean(row["LOB_SpecialEvent"]);
                    _quote.LOB_Property               = Convert.ToBoolean(row["LOB_Property"]);
                    _quote.LOB_VacantBuildingProperty = Convert.ToBoolean(row["LOB_VacantBuildingProperty"]);
                    _quote.LOB_BuilderRisk            = Convert.ToBoolean(row["LOB_BuilderRisk"]);
                    _quote.LOB_Crime                = Convert.ToBoolean(row["LOB_Crime"]);
                    _quote.LOB_InlandMarine         = Convert.ToBoolean(row["LOB_InlandMarine"]);
                    _quote.LOB_ContractorsEquipment = Convert.ToBoolean(row["LOB_ContractorsEquipment"]);
                    _quote.LOB_MotorTruck           = Convert.ToBoolean(row["LOB_MotorTruck"]);
                    _quote.UserID      = Convert.ToInt32(row["UserID"]);
                    _quote.QuoteStatus = Convert.ToString(row["QuoteStatus"]);

                    _quote.QuoteNo = Convert.ToString(row["QuoteNo"]);

                    _quote.Insured_Name     = Convert.ToString(row["Insured_Name"]);
                    _quote.Home_State_ID    = Convert.ToInt32(row["Home_State_ID"]);
                    _quote.Insured_State_ID = Convert.ToInt32(row["Home_State_ID"]);
                }
            }

            return(_quote);
        }
        public List <vwQuoteDetails> GetvwQuoteDetailsList()
        {
            List <vwQuoteDetails> list = null;

            using (DataTable table = SqlDBHelper.ExecuteSelectCommand("proc_vwQuoteDetails_GetAll", CommandType.StoredProcedure))
            {
                if (table.Rows.Count > 0)
                {
                    list = new List <vwQuoteDetails>();

                    foreach (DataRow row in table.Rows)
                    {
                        vwQuoteDetails _quote = new vwQuoteDetails();

                        _quote.ID = Convert.ToInt32(row["ID"]);
                        _quote.Mailing_Address1           = Convert.ToString(row["Mailing_Address1"]);
                        _quote.Mailing_Address2           = Convert.ToString(row["Mailing_Address2"]);
                        _quote.ZipCode                    = Convert.ToInt32(row["ZipCode"]);
                        _quote.City                       = Convert.ToString(row["City"]);
                        _quote.ZipCode                    = Convert.ToInt32(row["Insured_State_ID"]);
                        _quote.ZipCode                    = Convert.ToInt32(row["Home_State_ID"]);
                        _quote.Is_new_business            = Convert.ToBoolean(row["Is_new_business"]);
                        _quote.Years_Without_Loss         = Convert.ToInt32(row["Years_Without_Loss"]);
                        _quote.Effective_Date             = Convert.ToDateTime(row["Effective_Date"]);
                        _quote.Expiration_Date            = Convert.ToDateTime(row["Expiration_Date"]);
                        _quote.LOB_GeneralLiability       = Convert.ToBoolean(row["LOB_GeneralLiability"]);
                        _quote.LOB_VacantBuildingGL       = Convert.ToBoolean(row["LOB_VacantBuildingGL"]);
                        _quote.LOB_Owners                 = Convert.ToBoolean(row["LOB_Owners"]);
                        _quote.LOB_SpecialEvent           = Convert.ToBoolean(row["LOB_SpecialEvent"]);
                        _quote.LOB_Property               = Convert.ToBoolean(row["LOB_Property"]);
                        _quote.LOB_VacantBuildingProperty = Convert.ToBoolean(row["LOB_VacantBuildingProperty"]);
                        _quote.LOB_BuilderRisk            = Convert.ToBoolean(row["LOB_BuilderRisk"]);
                        _quote.LOB_Crime                  = Convert.ToBoolean(row["LOB_Crime"]);
                        _quote.LOB_InlandMarine           = Convert.ToBoolean(row["LOB_InlandMarine"]);
                        _quote.LOB_ContractorsEquipment   = Convert.ToBoolean(row["LOB_ContractorsEquipment"]);
                        _quote.LOB_MotorTruck             = Convert.ToBoolean(row["LOB_MotorTruck"]);
                        _quote.UserID                     = Convert.ToInt32(row["UserID"]);
                        _quote.QuoteStatus                = Convert.ToString(row["QuoteStatus"]);
                        _quote.HomeStateName              = Convert.ToString(row["HomeStateName"]);
                        _quote.InsureStateName            = Convert.ToString(row["InsureStateName"]);
                        _quote.QuoteNo                    = Convert.ToString(row["QuoteNo"]);
                        _quote.FullName                   = Convert.ToString(row["FullName"]);
                        _quote.FirstName                  = Convert.ToString(row["FirstName"]);
                        _quote.LastName                   = Convert.ToString(row["LastName"]);
                        _quote.Insured_Name               = Convert.ToString(row["Insured_Name"]);
                        list.Add(_quote);
                    }
                }

                return(list);
            }
        }
Ejemplo n.º 14
0
        //根据角色id删除角色权限表
        public int DeletePer(string rid)
        {
            string sql = string.Format(@" Delete  from [dbo].[GuanliPop]  where [GuanliID] ='{0}'", rid);

            if (SqlDBHelper.ADU(sql))
            {
                return(1);
            }
            else
            {
                return(2);
            }
        }
Ejemplo n.º 15
0
        public DataTable GetDateWiseSuccessFailure(DateTime RunDate)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@RunDate", RunDate)
            };


            DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleApplicationSummary_GetDateWiseSuccessFailure", CommandType.StoredProcedure, parameters);


            return(table);
        }
Ejemplo n.º 16
0
        public RuleDesc GetRuleDescDetails(int ID)
        {
            RuleDesc _rule = null;

            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@ID", ID)
            };

            using (DataTable table = SqlDBHelper.ExecuteParamerizedSelectCommand("proc_RuleDesc_LoadByPK", CommandType.StoredProcedure, parameters))
            {
                //check if any record exist or not
                if (table.Rows.Count == 1)
                {
                    DataRow row = table.Rows[0];


                    _rule              = new RuleDesc();
                    _rule.ID           = Convert.ToInt32(row["ID"]);
                    _rule.RuleName     = row["RuleName"].ToString();
                    _rule.EntryDate    = Convert.ToDateTime(row["EntryDate"]);
                    _rule.IsActive     = Convert.ToBoolean(row["IsActive"]);
                    _rule.ModifiedDate = Convert.ToDateTime(row["ModifiedDate"]);


                    _rule.RuleMastID = Convert.ToInt32(row["RuleMastID"]);

                    _rule.SplitAs               = Convert.ToString(row["SplitAs"]);
                    _rule.Dictionary            = Convert.ToString(row["Dictionary"]);
                    _rule.OriginalDocumentName  = Convert.ToString(row["OriginalDocumentName"]);
                    _rule.ConvertedDocumentName = Convert.ToString(row["ConvertedDocumentName"]);

                    _rule.NeighbourhoodCount = Convert.ToInt32(row["NeighbourhoodCount"]);
                    _rule.ContextWord        = Convert.ToString(row["ContextWord"]);
                    _rule.Operator           = Convert.ToString(row["Operator"]);
                    _rule.FieldName          = Convert.ToString(row["FieldName"]);
                    _rule.FieldValue         = Convert.ToString(row["FieldValue"]);
                    _rule.Expression1        = Convert.ToString(row["Expression1"]);
                    _rule.Expression2        = Convert.ToString(row["Expression2"]);

                    _rule.ExpressionContext = Convert.ToString(row["ExpressionContext"]);
                    _rule.IsIgnoreKeyword   = Convert.ToBoolean(row["IsIgnoreKeyword"]);
                    _rule.IsCheckSynonyms   = Convert.ToBoolean(row["IsCheckSynonyms"]);
                    _rule.FieldPosition     = Convert.ToString(row["FieldPosition"]);
                    _rule.Synonyms          = Convert.ToString(row["Synonyms"]);
                    _rule.AllSynonyms       = Convert.ToString(row["AllSynonyms"]);
                }
            }

            return(_rule);
        }
Ejemplo n.º 17
0
 internal bool addMaterial(Material material)
 {
     try
     {
         SqlParameter[] parameters = new SqlParameter[]
         {
             new SqlParameter("@pMaterialCode", material.MaterialCode),
             new SqlParameter("@pMaterialName", material.MaterialName),
             new SqlParameter("@pMaterialDescription", material.MaterialDescription),
             new SqlParameter("@pHSNCode", material.HSNCode),
             new SqlParameter("@pOneKGSize", material.Prices.OneKGSize),
             new SqlParameter("@pOneKGPrice", material.Prices.OneKGPrice),
             new SqlParameter("@pHalfKGSize", material.Prices.HalfKGSize),
             new SqlParameter("@pHalfKGPrice", material.Prices.HalfKGPrice),
             new SqlParameter("@pSize1", material.Prices.Size1),
             new SqlParameter("@pPrice1", material.Prices.Price1),
             new SqlParameter("@pSize2", material.Prices.Size2),
             new SqlParameter("@pPrice2", material.Prices.Price2),
             new SqlParameter("@pSize3", material.Prices.Size3),
             new SqlParameter("@pPrice3", material.Prices.Price3),
             new SqlParameter("@pSize4", material.Prices.Size4),
             new SqlParameter("@pPrice4", material.Prices.Price4),
             new SqlParameter("@pSize5", material.Prices.Size5),
             new SqlParameter("@pPrice5", material.Prices.Price5),
             new SqlParameter("@pSize6", material.Prices.Size6),
             new SqlParameter("@pPrice6", material.Prices.Price6),
             new SqlParameter("@pSize7", material.Prices.Size7),
             new SqlParameter("@pPrice7", material.Prices.Price7),
             new SqlParameter("@pSize8", material.Prices.Size8),
             new SqlParameter("@pPrice8", material.Prices.Price8),
             new SqlParameter("@pSize9", material.Prices.Size9),
             new SqlParameter("@pPrice9", material.Prices.Price9),
             new SqlParameter("@IsActive", material.IsActive),
             new SqlParameter("@IsDeleted", material.IsDeleted),
             new SqlParameter("@CreatedBy", material.CreatedBy)
         };
         material.MaterialId = Convert.ToInt32(SqlDBHelper.ExecuteNonQueryReturnData("app_AddMaterials", CommandType.StoredProcedure, parameters, "pMaterialId"));
         if (material.MaterialId == 0)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     catch (Exception ex)
     {
         return(false);
     }
 }
Ejemplo n.º 18
0
        /// <summary>
        /// 存储过程生成编号
        /// </summary>
        /// <returns></returns>
        public string BH()
        {
            string       sql = "proc_SJBH";
            SqlParameter ps  = new SqlParameter()
            {
                ParameterName = "@Cid",
                SqlDbType     = System.Data.SqlDbType.VarChar,
                Size          = 14,
                Direction     = System.Data.ParameterDirection.Output
            };

            SqlDBHelper.SelectFenYe(sql, ps);
            return(ps.Value.ToString());
        }
Ejemplo n.º 19
0
        internal DataTable getMaterialsForExcel()
        {
            DataTable table = new DataTable();

            parameters = new SqlParameter[]
            {
            };
            try
            {
                table = SqlDBHelper.ExecuteParamerizedSelectCommand("app_GetMaterialsForExcel", CommandType.StoredProcedure, parameters);
            }
            catch (Exception ex) { }
            return(table);
        }
Ejemplo n.º 20
0
        internal System.Data.DataTable getLastWeekCollection()
        {
            DataTable table = new DataTable();

            parameters = new SqlParameter[]
            {
            };
            try
            {
                table = SqlDBHelper.ExecuteParamerizedSelectCommand("app_GetLastWeekCollection", CommandType.StoredProcedure, parameters);
            }
            catch (Exception ex) { }
            return(table);
        }
Ejemplo n.º 21
0
 internal bool uploadCustomersForExcel()
 {
     try
     {
         parameters = new SqlParameter[]
         {
         };
         return(SqlDBHelper.ExecuteNonQuery("UploadCustomerExcelData", CommandType.StoredProcedure, parameters));
     }
     catch
     {
         return(false);
     }
 }
        public bool AddNew(APIRuleApplicationSummary _ruleSummary)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@RunID", _ruleSummary.RunID),
                new SqlParameter("@FileName", _ruleSummary.FileName),
                new SqlParameter("@RuleDescID", _ruleSummary.RuleDescID),
                new SqlParameter("@FieldValue", _ruleSummary.FieldValue),

                new SqlParameter("@EntryDate", _ruleSummary.EntryDate),
                new SqlParameter("@IsSuccess", _ruleSummary.IsSuccess),
            };
            return(SqlDBHelper.ExecuteNonQuery("proc_APIRuleApplicationSummary_AddNew", CommandType.StoredProcedure, parameters));
        }
Ejemplo n.º 23
0
        public bool UpdateorInsert(RuleEngineDetails _rule)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@RuleMastID", _rule.RuleMastID),
                new SqlParameter("@RuleDescID", _rule.RuleDescID),
                new SqlParameter("@FolderPath", _rule.FolderPath),
                new SqlParameter("@UserID", _rule.UserID),

                new SqlParameter("@CreateDate", _rule.CreateDate),
                new SqlParameter("@ModifiedDate", _rule.ModifiedDate),
                new SqlParameter("@IsActive", _rule.IsActive),
            };
            return(SqlDBHelper.ExecuteNonQuery("proc_RuleEngineDetails_InsertAndUpdate", CommandType.StoredProcedure, parameters));
        }
Ejemplo n.º 24
0
 internal bool deleteCustomer(int CustomerId)
 {
     try
     {
         parameters = new SqlParameter[]
         {
             new SqlParameter("@pCustomerId", CustomerId)
         };
         return(SqlDBHelper.ExecuteNonQuery("app_DeleteCustomers", CommandType.StoredProcedure, parameters));
     }
     catch
     {
         return(false);
     }
 }
Ejemplo n.º 25
0
 internal bool deleteMaterial(int materialId)
 {
     try
     {
         parameters = new SqlParameter[]
         {
             new SqlParameter("@pMaterialId", materialId)
         };
         return(SqlDBHelper.ExecuteNonQuery("app_DeleteMaterial", CommandType.StoredProcedure, parameters));
     }
     catch
     {
         return(false);
     }
 }
        public List <VwRuleDesc> GetRuleList()
        {
            List <VwRuleDesc> list = null;

            using (DataTable table = SqlDBHelper.ExecuteSelectCommand("proc_VwRuleDesc_GetAll", CommandType.StoredProcedure))
            {
                if (table.Rows.Count > 0)
                {
                    list = new List <VwRuleDesc>();

                    foreach (DataRow row in table.Rows)
                    {
                        VwRuleDesc _rule = new VwRuleDesc();

                        _rule.ID                    = Convert.ToInt32(row["ID"]);
                        _rule.RuleMastID            = Convert.ToInt32(row["RuleMastID"]);
                        _rule.RuleDescName          = Convert.ToString(row["RuleDescName"]);
                        _rule.SplitAs               = Convert.ToString(row["SplitAs"]);
                        _rule.Dictionary            = Convert.ToString(row["Dictionary"]);
                        _rule.OriginalDocumentName  = Convert.ToString(row["OriginalDocumentName"]);
                        _rule.ConvertedDocumentName = Convert.ToString(row["ConvertedDocumentName"]);
                        _rule.EntryDate             = Convert.ToDateTime(row["EntryDate"]);
                        _rule.ModifiedDate          = Convert.ToDateTime(row["ModifiedDate"]);
                        _rule.IsActive              = Convert.ToBoolean(row["IsActive"]);
                        _rule.NeighbourhoodCount    = Convert.ToInt32(row["NeighbourhoodCount"]);
                        _rule.Expression1           = Convert.ToString(row["Expression1"]);
                        _rule.Expression2           = Convert.ToString(row["Expression2"]);
                        _rule.ContextWord           = Convert.ToString(row["ContextWord"]);
                        _rule.Operator              = Convert.ToString(row["Operator"]);
                        _rule.RuleName              = Convert.ToString(row["RuleName"]);
                        _rule.IsActiveRuleMast      = Convert.ToBoolean(row["IsActiveRuleMast"]);
                        _rule.FieldName             = Convert.ToString(row["FieldName"]);
                        _rule.FieldValue            = Convert.ToString(row["FieldValue"]);
                        _rule.UploadedFile          = Convert.ToString(row["UploadedFile"]);

                        _rule.IsIgnoreKeyword   = Convert.ToBoolean(row["IsIgnoreKeyword"]);
                        _rule.FieldPosition     = Convert.ToString(row["FieldPosition"]);
                        _rule.IsCheckSynonyms   = Convert.ToBoolean(row["IsCheckSynonyms"]);
                        _rule.Synonyms          = Convert.ToString(row["Synonyms"]);
                        _rule.ExpressionContext = Convert.ToString(row["ExpressionContext"]);

                        list.Add(_rule);
                    }
                }
            }

            return(list);
        }
        public bool AddNew(LimitDetails _limit)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@Quote_ID", _limit.Quote_ID),
                new SqlParameter("@EachOccurence", _limit.EachOccurence),
                new SqlParameter("@GeneralAggregate", _limit.GeneralAggregate),
                new SqlParameter("@PremisesDamage", _limit.PremisesDamage),
                new SqlParameter("@MedicalExpense", _limit.MedicalExpense),
                new SqlParameter("@ProductCompleted", _limit.ProductCompleted),
                new SqlParameter("@DeductablePerClaim", _limit.DeductablePerClaim),
                new SqlParameter("@PersonalInjury", _limit.PersonalInjury),
            };

            return(SqlDBHelper.ExecuteNonQuery("proc_LimitDetails_AddNew", CommandType.StoredProcedure, parameters));
        }
 public bool AddNewStudentCourse(int cid, int sid)
 {
     try
     {
         SqlParameter[] parameters = new SqlParameter[]
         {
             new SqlParameter("@courseID", cid),
             new SqlParameter("@studentID", sid),
         };
         return(SqlDBHelper.ExecuteNonQuery("AddNewStudentCourse", CommandType.StoredProcedure, parameters));
     }
     catch
     {
         throw;
     }
 }
 public bool EndQuizz(int cid)
 {
     try
     {
         SqlParameter[] parameters = new SqlParameter[]
         {
             new SqlParameter("@courseID", cid),
             new SqlParameter("@setq", "0"),
         };
         return(SqlDBHelper.ExecuteNonQuery("StartQuiz", CommandType.StoredProcedure, parameters));
     }
     catch
     {
         throw;
     }
 }
Ejemplo n.º 30
0
        public bool AddNewEmployee(Employee employee)
        {
            SqlParameter[] parameters = new SqlParameter[]
            {
                new SqlParameter("@LastName", employee.LastName),
                new SqlParameter("@FirstName", employee.FirstName),
                new SqlParameter("@Title", employee.Title),
                new SqlParameter("@Address", employee.Address),
                new SqlParameter("@City", employee.City),
                new SqlParameter("@Region", employee.Region),
                new SqlParameter("@PostalCode", employee.PostalCode),
                new SqlParameter("@Country", employee.Country),
                new SqlParameter("@Extension", employee.Extension)
            };

            return(SqlDBHelper.ExecuteNonQuery("AddNewEmployee", CommandType.StoredProcedure, parameters));
        }