SqlParameter

We found 10 examples in language CSharp for this search. You will see 52 fragments of code.

Other methods

        public static void Run(Object state)
        {
            Console.WriteLine("Line 4");
        }

        public static void Main(String[] arg)
        {
            UpdateVatForCategory12();
            return;

            TestProject.Master.InvoiceProductPatch ABCD = new Master.InvoiceProductPatch();
            ABCD.UpdateTaxRate();
            return;

            InvoicePatch obj = new InvoicePatch();
            obj.UpdateInvoiceAmount();
            return;

            string TaxGroup1 = "CST*9";
            string TaxType = string.Empty;
            decimal TaxRate = 0.00M;
            if (!string.IsNullOrEmpty(TaxGroup1))
            {
                string[] splitTax = TaxGroup1.Split('-');
                if (splitTax.Count() > 1)
                {
                    TaxType = splitTax[0];
                    TaxRate = Converter.ToDecimal(splitTax[1]);
                }
                else
                {
                    TaxType = TaxGroup1;
                    TaxRate = 0.00M;
                }
            }

            decimal VatCstRate = 0M;

            if (TaxType == "CST")
            {
                if (TaxRate > 0.00M)
                {
                    VatCstRate = TaxRate + 100;
                }
            }
            else
            {
                if (TaxRate > 0.00M)
                {
                    VatCstRate = TaxRate + 100;
                }
            }

            // //InvoiceServiceTest();
            // //Note: DateTime object
            // //.ToString("dd.MM.yyyy", CultureInfo.InvariantCulture);

            // //Step-1
            // //CreditNotePatch crPatch = new CreditNotePatch();
            // //crPatch.UpdateCrNote();
            // //crPatch.DeleteDuplicateCrNote();

            // //Step-2
            // //InvoicePatch obj = new InvoicePatch();
            // //obj.UpdateInvoice();

            // //Step-3
            // //DuplicateInvoiceProductPatch obj1 = new DuplicateInvoiceProductPatch();
            // //obj1.UpdateInvoiceProductMasterStatus();

            return;

            // //IDemo a = new Demo();
            // //a.Print();

            // //Abc ob = new Abc();
            // //ob.A();
            // //return;

            // //Console.WriteLine("A" + "\r\n" + "A");

            // //Console.WriteLine(DecimalToWords(325.46M));

            int UserID = 3;
            string FilePath = @"D:\DONT DELETE\Desktop\Invoietoday\invoice (188).xlsx";//Invoicing feed.xlsx";
            int SheetType = 1;
            string FileName = "Invoicing feed";
            string con = @"Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + FilePath + ";Extended Properties ='Excel 8.0;HDR=Yes';";
            using (OleDbConnection OleDbCon = new OleDbConnection(con))
            {
                OleDbCon.Open();
                OleDbCommand oleDbCommand = new OleDbCommand();
                if (SheetType == 1)
                {
                    oleDbCommand = new OleDbCommand("Select * From [Invoicing$]", OleDbCon);
                    //oleDbCommand = new OleDbCommand("Select [Date], [Invoice No],[Party's Name], [Order ID], [Order Date], [Address], [Email ID], [Mobile No], [Product], [Rate], [Quantity], [Total], [Net Sales], [VAT], [Packaging], [Invoice Amt], [Sales Group] From [Invoicing feed$] Where [Invoice No] > 0", OleDbCon);
                }
                else if (SheetType == 2)
                {
                    oleDbCommand = new OleDbCommand("Select SettlementDate,Order ID,Invoice No,Invoice Date,Product Code,Quantity,Invoice Amt,Settlement Amount,Status from [Amount Receivable$]", OleDbCon);
                }
                else if (SheetType == 3)
                {
                    //oleDbCommand = new OleDbCommand("Select Product Code, Title, Size, MRP, PosterType, PosterDimensions,Dimensions in Inches, Poster Weight, Package Contents, Packaging Information, Shipping Duration, Variant, Color, Keywords," +
                    //    "SocialName,Publisher,PaperType,Description,Category,SubCategory,ArtistName,PaintingStyle,BlackAndWhitePoster,ColorPoster,PaperFinish,Shape,Orientation,Framed,FrameMaterial,OtherFrameDetails,Width,Height,PaperDepth," +
                    //    "Weight,OtherDimensions,OtherFeatures,SupplierImage,ImageLink,Note,WarrantSummary From MasterSheet");
                    oleDbCommand = new OleDbCommand("Select * From [Master Sheet$]", OleDbCon);
                }
                OleDbDataReader dr = oleDbCommand.ExecuteReader();
                StreamWriter sw = new StreamWriter(FileName);
                sw.WriteLine("       InvoiceNo      InvoiceDate        OrderID        ProductID          ErrorMessage");
                while (dr.Read())
                {
                    int invoiceNo = 0;
                    string orderID = string.Empty;
                    DateTime invoiceDate = new DateTime();
                    string productID = "";
                    string ErrorMsg = string.Empty;
                    int Result = 0;
                    try
                    {
                        Dictionary<int, SqlParameter> sqlParam = new Dictionary<int, SqlParameter>();
                        if (SheetType == 1)
                        {
                            int quantity = 0;
                            decimal rate, unitPrice, netSales, total = 0.00M;
                            decimal CST = 0.00M, VAT = 0.00M, ShippingHandling = 0.00M;
                            DateTime orderDate = new DateTime();
                            string TaxGroup, PartyName, Address, EmailID, MobNo, Vendor;

                            orderID = Converter.ToString(dr["Order ID"].ToString());
                            if (string.IsNullOrEmpty(orderID)) continue;
                            orderDate = Converter.ToDateTime(dr["Date"]);
                            if (orderDate <= new DateTime(1900, 01, 01)) orderDate = DateTime.Now.Date;
                            invoiceNo = 0;
							// //Converter.ToInt(dr["Invoice No"]);
                            // //if (invoiceNo == 0) continue;
                            invoiceDate = DateTime.Now.Date;

                            productID = Converter.ToString(dr["SKU"]).ToUpper();
                            quantity = Converter.ToInt(dr["Quantity"]);
                            rate = Converter.ToDecimal(dr["Rate"]);
                            TaxGroup = Converter.ToString(dr["Tax Group"]);
                            PartyName = Converter.ToString(dr["Party's Name"]);
                            Address = Converter.ToString(dr["Address"]);
                            EmailID = Converter.ToString(dr["Email ID"]);
                            MobNo = Converter.ToString(dr["Mobile No"]);
                            ShippingHandling = Math.Round((Converter.ToDecimal(dr["Shipping & Handling"])), 2);
                            Vendor = Converter.ToString(dr["Sales Group"]);

                            if (TaxGroup == "CST")
                            {
                                unitPrice = Math.Round(((rate / 102) * 100), 2);
                                CST = (rate - unitPrice) * quantity;
                            }
                            else
                            {
                                unitPrice = Math.Round(((rate / 105) * 100), 2);
                                VAT = (rate - unitPrice) * quantity;
                            }

                            netSales = unitPrice * quantity;
                            total = (rate * quantity) + Math.Round((Converter.ToDecimal(dr["Shipping & Handling"])), 2);

                            sqlParam[0] = new SqlParameter("@datetimeInvoiceDate", invoiceDate);
                            sqlParam[1] = new SqlParameter("@intInvoicNo", invoiceNo);
                            sqlParam[2] = new SqlParameter("@varcharPartysName", dr[2]);
                            sqlParam[3] = new SqlParameter("@intOrderID", orderID);
                            sqlParam[4] = new SqlParameter("@datetimeOrderDate", Convert.ToDateTime(dr[4]));
                            sqlParam[5] = new SqlParameter("@varcharAddress", dr[5]);
                            sqlParam[6] = new SqlParameter("@varcharEmailID", dr[6]);
                            sqlParam[7] = new SqlParameter("@varcharMobileNo", dr[7]);
                            sqlParam[8] = new SqlParameter("@varcharProductID", productID);
                            sqlParam[9] = new SqlParameter("@decimalRate", Convert.ToDecimal(dr[9]));
                            sqlParam[10] = new SqlParameter("@intQuantity", Convert.ToInt32(dr[10]));
                            sqlParam[11] = new SqlParameter("@decimalTotal", Convert.ToDecimal(dr[11]));
                            sqlParam[12] = new SqlParameter("@decimalNetSale", Convert.ToDecimal(dr[12]));
                            sqlParam[13] = new SqlParameter("@decimalVat", Convert.ToDecimal(dr[13]));
                            sqlParam[14] = new SqlParameter("@decimalPackagingAndForwarding", Convert.ToDecimal(dr[14]));
                            sqlParam[15] = new SqlParameter("@decimalInvoiceAmount", Convert.ToDecimal(dr[15]));
                            sqlParam[16] = new SqlParameter("@nvarcharVendor", dr[16]);
                            sqlParam[17] = new SqlParameter("@intCreatedModifiedBy", UserID);
                            if (SqlUtility.ExecuteCommandSpReturnVal(GetConnectionString(), "sp_im_InsertInvoicingFeed", sqlParam) > 0)
                            {
                                return;
                            }
                        }
                        if (SheetType == 2)
                        {
                            invoiceNo = Convert.ToInt32(dr[2]);
                            orderID = Convert.ToString(dr[1]);
                            invoiceDate = Convert.ToDateTime(dr[3]);
                            productID = dr[4].ToString();

                            sqlParam[0] = new SqlParameter("@datetimeSettlementDate", dr[0]);
                            sqlParam[1] = new SqlParameter("@intOrderID", dr[1]);
                            sqlParam[2] = new SqlParameter("@intInvoiceNo", dr[2]);
                            sqlParam[3] = new SqlParameter("@datetimeInvoiceDate", dr[3]);
                            sqlParam[4] = new SqlParameter("@varcharProductID", dr[4]);
                            sqlParam[5] = new SqlParameter("@decimalSettlementAmount", dr[5]);
                            sqlParam[6] = new SqlParameter("@intStatus", dr[6]);
                            sqlParam[7] = new SqlParameter("@intCreatedModifiedBy", UserID);
                            if (SqlUtility.ExecuteCommandSpReturnVal(GetConnectionString(), "sp_im_UpdateAmountReceivable", sqlParam) > 0)
                            {
                                return;
                            }
                        }
                        if (SheetType == 3)
                        {
                            productID = dr[0].ToString();

                            sqlParam[0] = new SqlParameter("@varcharProductID", dr[0]);
                            sqlParam[1] = new SqlParameter("@varcharTitle", dr[1]);
                            sqlParam[2] = new SqlParameter("@varcharSize", dr[2]);
                            sqlParam[3] = new SqlParameter("@decimalMRP", dr[3]);
                            sqlParam[4] = new SqlParameter("@varcharPosterType", dr[4]);
                            sqlParam[5] = new SqlParameter("@varcharPosterDimensions", dr[5]);
                            sqlParam[6] = new SqlParameter("@varcharDimensionsInInches", dr[6]);
                            sqlParam[7] = new SqlParameter("@intPosterWeight", dr[7]);
                            sqlParam[8] = new SqlParameter("@varcharPackageContents", dr[8]);
                            sqlParam[9] = new SqlParameter("@varcharPosterDimensions", dr[9]);
                            sqlParam[10] = new SqlParameter("@varcharPackagingInformation", dr[10]);
                            sqlParam[11] = new SqlParameter("@intShippingDuration", dr[11]);
                            sqlParam[12] = new SqlParameter("@varcharVariant", dr[12]);
                            sqlParam[13] = new SqlParameter("@varcharColor", dr[13]);
                            sqlParam[14] = new SqlParameter("@varcharKeywords", dr[14]);
                            sqlParam[15] = new SqlParameter("@varcharSocialName", dr[15]);
                            sqlParam[16] = new SqlParameter("@varcharPublisher", dr[16]);
                            sqlParam[17] = new SqlParameter("@varcharPaperType", dr[17]);
                            sqlParam[18] = new SqlParameter("@varcharDescription", dr[18]);
                            sqlParam[19] = new SqlParameter("@varcharCategory", dr[19]);
                            sqlParam[20] = new SqlParameter("@varcharSubCategory", dr[20]);
                            sqlParam[21] = new SqlParameter("@varcharArtistName", dr[21]);
                            sqlParam[22] = new SqlParameter("@varcharPaintingStyle", dr[22]);
                            sqlParam[23] = new SqlParameter("@varcharBlackAndWhitePoster", dr[23]);
                            sqlParam[24] = new SqlParameter("@varcharColorPoster", dr[24]);
                            sqlParam[25] = new SqlParameter("@varcharPaperFinish", dr[25]);
                            sqlParam[26] = new SqlParameter("@varcharShape", dr[26]);
                            sqlParam[27] = new SqlParameter("@varcharOrientation", dr[27]);
                            sqlParam[28] = new SqlParameter("@varcharFramed", dr[28]);
                            sqlParam[29] = new SqlParameter("@varcharFrameMaterial", dr[29]);
                            sqlParam[30] = new SqlParameter("@varcharOtherFrameDetails", dr[30]);
                            sqlParam[31] = new SqlParameter("@intwidth", dr[31]);
                            sqlParam[32] = new SqlParameter("@intHeight", dr[32]);
                            sqlParam[33] = new SqlParameter("@intPaperDepth", dr[33]);
                            sqlParam[34] = new SqlParameter("@decimalWeight", dr[34]);
                            sqlParam[35] = new SqlParameter("@varcharOtherDimensions", dr[35]);
                            sqlParam[36] = new SqlParameter("@varcharOtherFeatures", dr[36]);
                            sqlParam[37] = new SqlParameter("@varcharSupplierImage", dr[37]);
                            sqlParam[38] = new SqlParameter("@varcharImageLink", dr[38]);
                            sqlParam[39] = new SqlParameter("@varcharNote", dr[39]);
                            sqlParam[40] = new SqlParameter("@varcharWarrantySummary", dr[40]);
                            sqlParam[41] = new SqlParameter("@intCreatedModifiedBy", UserID);
                            if (SqlUtility.ExecuteCommandSpReturnVal(GetConnectionString(), "sp_pm_InsertProduct", sqlParam) > 0)
                            {
                                return;
                            }
                        }
                        return;
                    }
                    catch (Exception ex)
                    {
                        sw.WriteLine(invoiceNo + "     " + orderID + "        " + invoiceDate.ToString("dd-MM-yyyy") + "        " + productID + "       " + ex.Message);
                    }
                }

                //string val = IMSLibrary.EncryptDecrypt.Encrypt("1234", "Rohan");

                //System.Threading.Thread t = new System.Threading.Thread(Run);
                //Console.WriteLine("Line 1");
                //t.Start();
                //Console.WriteLine("Line 2");
                //t.Join();
                //Console.WriteLine("Line 3");
                //Console.ReadLine();
            }
        }

        public static string NumberToWords(int number)
        {
            if (number == 0)
                return "Zero";

            if (number < 0)
                return "Minus " + NumberToWords(Math.Abs(number));

            string words = "";

            if ((number / 1000000) > 0)
            {
                words += NumberToWords(number / 1000000) + " Million ";
                number %= 1000000;
            }

            if ((number / 1000) > 0)
            {
                words += NumberToWords(number / 1000) + " Thousand ";
                number %= 1000;
            }

            if ((number / 100) > 0)
            {
                words += NumberToWords(number / 100) + " Hundred ";
                number %= 100;
            }

            if (number > 0)
            {
                if (words != "")
                    words += "and ";

                var unitsMap = new[] { "Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen" };
                var tensMap = new[] { "Zero", "Ten", "Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety" };

                if (number < 20)
                    words += unitsMap[number];
                else
                {
                    words += tensMap[number / 10];
                    if ((number % 10) > 0)
                        words += "-" + unitsMap[number % 10];
                }
            }

            return words;
        }

        public static string DecimalToWords(decimal d)
        {
            //Grab a string form of your decimal value ("12.34")
            var formatted = d.ToString();

            if (formatted.Contains("."))
            {
                //If it contains a decimal point, split it into both sides of the decimal
                string[] sides = formatted.Split('.');

                //Process each side and append them with "and", "dot" or "point" etc.
                return NumberToWords(Int32.Parse(sides[0].ToString())) + " and " + NumberToWords(Int32.Parse(sides[1].ToString())) + " Paisa.";
            }
            else
            {
                //Else process as normal
                return NumberToWords(Convert.ToInt32(d));
            }
        }

        private static List<ProductDetails> InvoiceProductPatch(SqlConnection sqlCon)
        {
            try
            {
                List<ProductDetails> lstInvoiceProduct = new List<ProductDetails>();
                string query = "Select InvoiceDate,InvoiceNo,OrderDate,OrderID,ProductID,Quantity,Rate,PackagingAndForwarding,CST From InvoiceProductMaster ipm " +
                               "where ipm.InvoiceDate between '2016-04-01'And '2016-09-16'" +
                               "And ipm.VAT > 0 and ipm.ProductID in (select ProductID from ProductDescriptionMaster pdm where pdm.Category in (15,4,24,23,8,16,13,22,11))";

                SqlCommand cmd = new SqlCommand(query, sqlCon);
                sqlCon.Open();
                SqlDataReader dr = cmd.ExecuteReader();
                if (dr.HasRows)
                {
                    while (dr.Read())
                    {
                        ProductDetails invoiceProduct = new ProductDetails();
                        invoiceProduct.InvoiceDate = Converter.ToDateTime(dr["InvoiceDate"]);
                        invoiceProduct.InvoiceNo = Converter.ToInt(dr["InvoiceNo"]);
                        invoiceProduct.OrderDate = Converter.ToDateTime(dr["OrderDate"]);
                        invoiceProduct.OrderID = Converter.ToString(dr["OrderID"]);
                        invoiceProduct.ProductID = Converter.ToString(dr["ProductID"]);
                        invoiceProduct.Quantity = Converter.ToInt(dr["Quantity"]);
                        invoiceProduct.Rate = Converter.ToDecimal(dr["Rate"]);
                        //invoiceProduct.PackagingAndForwarding = Converter.ToDecimal(dr["PackagingAndForwarding"]);
                        //invoiceProduct.CST = Converter.ToDecimal(dr["CST"]);
                        //invoiceProduct.TaxGroup = "VAT";
                        //if (invoiceProduct.CST > 0.00M)
                        //{
                        //    invoiceProduct.TaxGroup = "CST";
                        //}
                        lstInvoiceProduct.Add(invoiceProduct);
                    }
                }
                dr.Close();
                cmd.Dispose();
                sqlCon.Close();
                return lstInvoiceProduct;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }

        private static bool UpdateInvoiceProduct(ProductDetails productDetails, SqlConnection sqlCon, SqlTransaction transaction)
        {
            try
            {
                decimal VatCstRate = 0M;

                VatCstRate = 12.5M + 100;
                productDetails.UnitPrice = Math.Round(((productDetails.Rate / VatCstRate) * 100), 2);
                //productDetails.VAT = (productDetails.Rate - productDetails.UnitPrice) * productDetails.Quantity;

                //productDetails.TaxRate = VatCstRate - 100;
                //productDetails.NetSale = productDetails.UnitPrice * productDetails.Quantity;
                //productDetails.Total = (productDetails.Rate * productDetails.Quantity) + Math.Round(productDetails.PackagingAndForwarding, 2);

                string Query = string.Empty;
                //Query = "Update InvoiceProductMaster Set UnitPrice =" + productDetails.UnitPrice + ", Total =" + productDetails.Total + ", NetSale=" + productDetails.NetSale + ",VAT=" + productDetails.VAT + ", TaxRate=" + (VatCstRate - 100) + " ";
                Query += "Where OrderID = '" + productDetails.OrderID + "' And ProductID = '" + productDetails.ProductID + "' And InvoiceDate = '" + productDetails.InvoiceDate.Date + "' And OrderDate = '" + productDetails.OrderDate.Date + "'";
                SqlCommand cmd = new SqlCommand(Query, sqlCon, transaction);
                int Result = cmd.ExecuteNonQuery();
                if (Result <= 0)
                {
                    transaction.Rollback();
                    return false;
                }
                return true;
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }


    #region Parameters Methods
    public static SqlParameter CreateParameter(string prm_name, SqlDbType type, object prm_value)
    {
        SqlParameter prm = new SqlParameter(prm_name, type);
        prm.Value = prm_value;
        return prm;
    }



    public static SqlParameter CreateParameter(string prm_name, SqlDbType type, ParameterDirection dir)
    {
        SqlParameter prm = new SqlParameter(prm_name, type);
        prm.Direction = dir;
        return prm;
    } 
    #endregion


    #region Disconnected Methods
    public static DataSet GetDataSet(string stored_name, string table_name, params SqlParameter[] prmarr)
    {
        SqlConnection con = new SqlConnection(constr);
        SqlCommand cmd = new SqlCommand(stored_name, con);
        foreach (SqlParameter prm in prmarr)
        {
            cmd.Parameters.Add(prm);
        }
        cmd.CommandType = CommandType.StoredProcedure;
        SqlDataAdapter da = new SqlDataAdapter(cmd);
        DataSet ds = new DataSet();
        da.Fill(ds, table_name);

        return ds;
    }
    #endregion


    #region Connected Methods
    public static SqlDataReader GetDataReader(string stored_name,out SqlConnection conout, params SqlParameter[] prmarr)
    {
        SqlConnection con = new SqlConnection(constr);
        SqlCommand cmd = new SqlCommand(stored_name, con);
        foreach (SqlParameter prm in prmarr)
        {
            cmd.Parameters.Add(prm);
        }
        cmd.CommandType = System.Data.CommandType.StoredProcedure;
        con.Open();
        SqlDataReader dr = cmd.ExecuteReader();
        conout = con;
        return dr;
        
    }


    public static int ExecuteNonQuery(string stored_name, params SqlParameter[] prmarr)
    {
        SqlConnection con = new SqlConnection(constr);
        SqlCommand cmd = new SqlCommand(stored_name, con);
        foreach (SqlParameter prm in prmarr)
        {
            cmd.Parameters.Add(prm);
        }
        cmd.CommandType = System.Data.CommandType.StoredProcedure;
        con.Open();
        int x = cmd.ExecuteNonQuery();
        con.Close();
        return x;
    }



    public static object ExecuteScalar(string stored_name, params SqlParameter[] prmarr)
    {
        SqlConnection con = new SqlConnection(constr);
        SqlCommand cmd = new SqlCommand(stored_name, con);
        foreach (SqlParameter prm in prmarr)
        {
            cmd.Parameters.Add(prm);
        }
        cmd.CommandType = System.Data.CommandType.StoredProcedure;
        con.Open();
        object o = cmd.ExecuteScalar();
        con.Close();
        return o;
    }


        public void CreateMMETransaction(MMDAA header, List<MMDAB> details)
        {
            using (var db = _ActiveDbContext)
            {
                using (var transaction = db.Database.BeginTransaction())
                {
                    //SYSID,DAA001,DAA002,DAA003,DAA004,DAA005,DAA006,DAA007,DAA009,DAA010,DAA011,DAA015,DAA020,DAA030,DAA999,CreatedDate,Creator)VALUES(@SYSID,@DAA001,@DAA002,@DAA003,@DAA004,@DAA005,@DAA006,@DAA007,@DAA009,@DAA010,@DAA011,@DAA015,@DAA020,@DAA030,'N',getdate(),@Creator)
                    db.Database.ExecuteSqlCommand(@"INSERT INTO MMDAA(DAA001,DAA002,SYSID,DAA003,DAA004,DAA005,DAA006,DAA007,DAA008,DAA009,DAA010,DAA011,DAA015,DAA016,DAA020,DAA030,DAA041,DAA042,DAA800,DAA801,DAA851,DAA852,DAA854,DAA855,DAA857,DAA858,DAA992,DAA993,DAA994,DAA995,DAA996,DAA997,DAA998,DAA999,Creator,CreatedDate,Modifier,ModifiedDate)
                                                    VALUES(@DAA001,@DAA002,@SYSID,@DAA003,@DAA004, @DAA005, @DAA006, @DAA007, @DAA008, @DAA009, @DAA010, @DAA011, @DAA015, @DAA016, @DAA020, @DAA030, @DAA041, @DAA042, @DAA800, @DAA801, @DAA851, @DAA852, @DAA854, @DAA855, @DAA857, @DAA858, @DAA992, @DAA993, @DAA994, @DAA995, @DAA996, @DAA997, @DAA998, @DAA999, @Creator, @CreatedDate, @Modifier, @ModifiedDate)",
                        new SqlParameter("@DAA001", header.DAA001),
                        new SqlParameter("@DAA002", header.DAA002),
                        new SqlParameter("@SYSID", header.SYSID??""),
                        new SqlParameter("@DAA003", header.DAA003),
                        new SqlParameter("@DAA004", header.DAA004),
                        new SqlParameter("@DAA005", header.DAA005??""),
                        new SqlParameter("@DAA006", header.DAA006??""),
                        new SqlParameter("@DAA007", header.DAA007??""),
                        new SqlParameter("@DAA008", header.DAA008??""),
                        new SqlParameter("@DAA009", header.DAA009??""),
                        new SqlParameter("@DAA010", header.DAA010??""),
                        new SqlParameter("@DAA011", header.DAA011??""),
                        new SqlParameter("@DAA015", header.DAA015??0),
                        new SqlParameter("@DAA016", header.DAA016??0),
                        new SqlParameter("@DAA020", header.DAA020??""),
                        new SqlParameter("@DAA030", header.DAA030??""),
                        new SqlParameter("@DAA041", header.DAA041??0),
                        new SqlParameter("@DAA042", header.DAA042??0),
                        new SqlParameter("@DAA800", DBNull.Value),
                        new SqlParameter("@DAA801", DBNull.Value),
                        new SqlParameter("@DAA851", header.DAA851??""),
                        new SqlParameter("@DAA852", header.DAA852??""),
                        new SqlParameter("@DAA854", header.DAA854??""),
                        new SqlParameter("@DAA855", header.DAA855??""),
                        new SqlParameter("@DAA857", header.DAA857??""),
                        new SqlParameter("@DAA858", header.DAA858??""),
                        new SqlParameter("@DAA992", header.DAA992??""),
                        new SqlParameter("@DAA993", header.DAA993??0),
                        new SqlParameter("@DAA994", header.DAA994??0),
                        new SqlParameter("@DAA995", header.DAA995??""),
                        new SqlParameter("@DAA996", header.DAA996??""),
                        new SqlParameter("@DAA997", header.DAA997??""),
                        new SqlParameter("@DAA998", header.DAA998??""),
                        new SqlParameter("@DAA999", header.DAA999??""),
                        new SqlParameter("@Creator", header.Creator??""),
                        new SqlParameter("@CreatedDate", DateTime.Now),
                        new SqlParameter("@Modifier", DBNull.Value),
                        new SqlParameter("@ModifiedDate", DBNull.Value)
                        );

                    //INSERT INTO MMDAB(SYSID,DAB001,DAB002,DAB003,DAB004,DAB005,DAB007,DAB008,DAB009,DAB010,DAB011,DAB020,DAB021,DAB022,DAB026,DAB034,DAB035,DAB995,DAB999,CreatedDate,Creator)VALUES(@SYSID,@DAB001,@DAB002,@DAB003,@DAB004,@DAB005,@DAB007,@DAB008,@DAB009,@DAB010,@DAB011,@DAB020,@DAB021,@DAB022,@DAB026,@DAB034,@DAB035,@DAB995,'N',getdate(),@Creator)
                    foreach (MMDAB objDAB in details)
                    {
                        db.Database.ExecuteSqlCommand(@"INSERT INTO MMDAB(DAB001,DAB002,DAB003,SYSID,DAB004,DAB005,DAB006,DAB007,DAB008,DAB009,DAB010,DAB011,DAB020,DAB021,DAB022,DAB025,DAB026,DAB034,DAB035,DAB036,DAB051,DAB052,DAB053,DAB054,DAB800,DAB801,DAB851,DAB852,DAB853,DAB854,DAB855,DAB856,DAB857,DAB858,DAB859,DAB992,DAB993,DAB994,DAB995,DAB996,DAB997,DAB998,DAB999,Creator,CreatedDate,Modifier,ModifiedDate)
                                                        VALUES(@DAB001, @DAB002, @DAB003, @SYSID, @DAB004, @DAB005, @DAB006, @DAB007, @DAB008, @DAB009, @DAB010, @DAB011, @DAB020, @DAB021, @DAB022, @DAB025, @DAB026, @DAB034, @DAB035, @DAB036, @DAB051, @DAB052, @DAB053, @DAB054, @DAB800, @DAB801, @DAB851, @DAB852, @DAB853, @DAB854, @DAB855, @DAB856, @DAB857, @DAB858, @DAB859, @DAB992, @DAB993, @DAB994, @DAB995, @DAB996, @DAB997, @DAB998, @DAB999, @Creator, @CreatedDate, @Modifier, @ModifiedDate)",
                                                           new SqlParameter("@DAB001", objDAB.DAB001),
                                                           new SqlParameter("@DAB002", objDAB.DAB002),
                                                           new SqlParameter("@DAB003", objDAB.DAB003),
                                                           new SqlParameter("@SYSID", objDAB.SYSID??""),
                                                           new SqlParameter("@DAB004", objDAB.DAB004??""),
                                                           new SqlParameter("@DAB005", objDAB.DAB005??""),
                                                           new SqlParameter("@DAB006", objDAB.DAB006??""),
                                                           new SqlParameter("@DAB007", objDAB.DAB007??""),
                                                           new SqlParameter("@DAB008", objDAB.DAB008??""),
                                                           new SqlParameter("@DAB009", objDAB.DAB009??""),
                                                           new SqlParameter("@DAB010", objDAB.DAB010??""),
                                                           new SqlParameter("@DAB011", objDAB.DAB011??""),
                                                           new SqlParameter("@DAB020", objDAB.DAB020??""),
                                                           new SqlParameter("@DAB021", objDAB.DAB021??""),
                                                           new SqlParameter("@DAB022", objDAB.DAB022??""),
                                                           new SqlParameter("@DAB025", objDAB.DAB025??0),
                                                           new SqlParameter("@DAB026", objDAB.DAB026??0),
                                                           new SqlParameter("@DAB034", objDAB.DAB034??""),
                                                           new SqlParameter("@DAB035", objDAB.DAB035??""),
                                                           new SqlParameter("@DAB036", objDAB.DAB036??""),
                                                           new SqlParameter("@DAB051", objDAB.DAB051??""),
                                                           new SqlParameter("@DAB052", objDAB.DAB052??0),
                                                           new SqlParameter("@DAB053", objDAB.DAB053??0),
                                                           new SqlParameter("@DAB054", objDAB.DAB054??""),
                                                           new SqlParameter("@DAB800", DBNull.Value),
                                                           new SqlParameter("@DAB801", DBNull.Value),
                                                           new SqlParameter("@DAB851", objDAB.DAB851??""),
                                                           new SqlParameter("@DAB852", objDAB.DAB852??""),
                                                           new SqlParameter("@DAB853", objDAB.DAB853??""),
                                                           new SqlParameter("@DAB854", objDAB.DAB854??""),
                                                           new SqlParameter("@DAB855", objDAB.DAB855??""),
                                                           new SqlParameter("@DAB856", objDAB.DAB856??""),
                                                           new SqlParameter("@DAB857", objDAB.DAB857??""),
                                                           new SqlParameter("@DAB858", objDAB.DAB858??""),
                                                           new SqlParameter("@DAB859", objDAB.DAB859??""),
                                                           new SqlParameter("@DAB992", objDAB.DAB992??""),
                                                           new SqlParameter("@DAB993", objDAB.DAB993??0),
                                                           new SqlParameter("@DAB994", objDAB.DAB994??0),
                                                           new SqlParameter("@DAB995", objDAB.DAB995??""),
                                                           new SqlParameter("@DAB996", objDAB.DAB996??""),
                                                           new SqlParameter("@DAB997", objDAB.DAB997??""),
                                                           new SqlParameter("@DAB998", objDAB.DAB998??""),
                                                           new SqlParameter("@DAB999", objDAB.DAB999??""),
                                                           new SqlParameter("@Creator", objDAB.Creator??""),
                                                           new SqlParameter("@CreatedDate", DateTime.Now),
                                                           new SqlParameter("@Modifier", DBNull.Value),
                                                           new SqlParameter("@ModifiedDate", DBNull.Value)
                                                        );
                    }

                    transaction.Commit();
                }
            }
        }

        public void CreateMMBTransaction(MMDCA header, List<MMDCB> details)
        {
            using (var db = _ActiveDbContext)
            {
                using (var transaction = db.Database.BeginTransaction())
                {
                    db.Database.ExecuteSqlCommand(@"INSERT INTO MMDCA(SYSID,DCA001,DCA002,DCA003,DCA004,DCA005,DCA006,DCA015,DCA020,DCA030,DCA995,DCA999,CreatedDate,Creator)
                                                    VALUES (@SYSID,@DCA001,@DCA002,@DCA003,@DCA004,@DCA005,@DCA006,@DCA015,@DCA020,@DCA030,@DCA995,'N',getdate(),@Creator)",
                        new SqlParameter("@SYSID", header.SYSID ?? ""),
                        new SqlParameter("@DCA001", header.DCA001),
                        new SqlParameter("@DCA002", header.DCA002),
                        new SqlParameter("@DCA003", header.DCA003),
                        new SqlParameter("@DCA004", header.DCA004),
                        new SqlParameter("@DCA005", header.DCA005 ?? ""),
                        new SqlParameter("@DCA006", header.DCA006 ?? ""),
                        new SqlParameter("@DCA015", header.DCA015 ?? 0),
                        new SqlParameter("@DCA020", header.DCA020 ?? ""),
                        new SqlParameter("@DCA030", header.DCA030 ?? ""),
                        new SqlParameter("@DCA995", header.DCA995 ?? ""),
                        new SqlParameter("@Creator", header.Creator ?? "")
                        );

                    foreach (MMDCB objDCB in details)
                    {
                        db.Database.ExecuteSqlCommand(@"INSERT INTO MMDCB(SYSID,DCB001,DCB002,DCB003,DCB004,DCB005,DCB007,DCB008,DCB009,DCB010,DCB011,DCB020,DCB021,DCB022,DCB026,DCB034,DCB035,DCB851,DCB852,DCB853,DCB995,DCB999,CreatedDate,Creator)
                                                        VALUES (@SYSID,@DCB001,@DCB002,@DCB003,@DCB004,@DCB005,@DCB007,@DCB008,@DCB009,@DCB010,@DCB011,@DCB020,@DCB021,@DCB022,@DCB026,@DCB034,@DCB035,@DCB851,@DCB852,@DCB853,@DCB995,'N',getdate(),@Creator)",
                                                           new SqlParameter("@SYSID", objDCB.SYSID ?? ""),
                                                           new SqlParameter("@DCB001", objDCB.DCB001),
                                                           new SqlParameter("@DCB002", objDCB.DCB002),
                                                           new SqlParameter("@DCB003", objDCB.DCB003),
                                                           new SqlParameter("@DCB004", objDCB.DCB004 ?? ""),
                                                           new SqlParameter("@DCB005", objDCB.DCB005 ?? ""),
                                                           new SqlParameter("@DCB007", objDCB.DCB007 ?? ""),
                                                           new SqlParameter("@DCB008", objDCB.DCB008 ?? ""),
                                                           new SqlParameter("@DCB009", objDCB.DCB009 ?? ""),
                                                           new SqlParameter("@DCB010", objDCB.DCB010 ?? ""),
                                                           new SqlParameter("@DCB011", objDCB.DCB011 ?? ""),
                                                           new SqlParameter("@DCB020", objDCB.DCB020 ?? ""),
                                                           new SqlParameter("@DCB021", objDCB.DCB021 ?? ""),
                                                           new SqlParameter("@DCB022", objDCB.DCB022 ?? ""),
                                                           new SqlParameter("@DCB026", objDCB.DCB026 ?? 0),
                                                           new SqlParameter("@DCB034", objDCB.DCB034 ?? ""),
                                                           new SqlParameter("@DCB035", objDCB.DCB035 ?? ""),
                                                           new SqlParameter("@DCB851", objDCB.DCB851 ?? ""),
                                                           new SqlParameter("@DCB852", objDCB.DCB852 ?? ""),
                                                           new SqlParameter("@DCB853", objDCB.DCB853 ?? ""),
                                                           new SqlParameter("@DCB995", objDCB.DCB995 ?? ""),
                                                           new SqlParameter("@Creator", objDCB.Creator ?? "")
                                                        );
                    }

                    transaction.Commit();
                }
            }
        }

        public void CreateMMDTransaction(MMDEA header, List<MMDEB> details)
        {
            using (var db = _ActiveDbContext)
            {
                using (var transaction = db.Database.BeginTransaction())
                {
                    db.Database.ExecuteSqlCommand(@"INSERT INTO MMDEA(SYSID,DEA001,DEA002,DEA003,DEA004,DEA005,DEA006,DEA015,DEA020,DEA030,DEA999,CreatedDate,Creator)
                                                    VALUES (@SYSID,@DEA001,@DEA002,@DEA003,@DEA004,@DEA005,@DEA006,@DEA015,@DEA020,@DEA030,'N',getdate(),@Creator)",
                        new SqlParameter("@SYSID", header.SYSID ?? ""),
                        new SqlParameter("@DEA001", header.DEA001),
                        new SqlParameter("@DEA002", header.DEA002),
                        new SqlParameter("@DEA003", header.DEA003),
                        new SqlParameter("@DEA004", header.DEA004),
                        new SqlParameter("@DEA005", header.DEA005 ?? ""),
                        new SqlParameter("@DEA006", header.DEA006 ?? ""),
                        new SqlParameter("@DEA015", header.DEA015 ?? 0),
                        new SqlParameter("@DEA020", header.DEA020 ?? ""),
                        new SqlParameter("@DEA030", header.DEA030 ?? ""),
                        new SqlParameter("@Creator", header.Creator ?? "")
                        );

                    foreach (MMDEB objDEB in details)
                    {
                        db.Database.ExecuteSqlCommand(@"INSERT INTO MMDEB(SYSID,DEB001,DEB002,DEB003,DEB004,DEB005,DEB007,DEB008,DEB011,DEB012,DEB013,DEB016,DEB017,DEB018,DEB020,DEB021,DEB022,DEB026,DEB034,DEB999,CreatedDate,Creator)
                                                        VALUES (@SYSID,@DEB001,@DEB002,@DEB003,@DEB004,@DEB005,@DEB007,@DEB008,@DEB011,@DEB012,@DEB013,@DEB016,@DEB017,@DEB018,@DEB020,@DEB021,@DEB022,@DEB026,@DEB034,'N',getdate(),@Creator)",
                                                           new SqlParameter("@SYSID", objDEB.SYSID ?? ""),
                                                           new SqlParameter("@DEB001", objDEB.DEB001),
                                                           new SqlParameter("@DEB002", objDEB.DEB002),
                                                           new SqlParameter("@DEB003", objDEB.DEB003),
                                                           new SqlParameter("@DEB004", objDEB.DEB004 ?? ""),
                                                           new SqlParameter("@DEB005", objDEB.DEB005 ?? ""),
                                                           new SqlParameter("@DEB007", objDEB.DEB007 ?? ""),
                                                           new SqlParameter("@DEB008", objDEB.DEB008 ?? ""),
                                                           new SqlParameter("@DEB011", objDEB.DEB011 ?? ""),
                                                           new SqlParameter("@DEB012", objDEB.DEB012 ?? ""),
                                                           new SqlParameter("@DEB013", objDEB.DEB013 ?? ""),
                                                           new SqlParameter("@DEB016", objDEB.DEB016 ?? ""),
                                                           new SqlParameter("@DEB017", objDEB.DEB017 ?? ""),
                                                           new SqlParameter("@DEB018", objDEB.DEB018 ?? ""),
                                                           new SqlParameter("@DEB020", objDEB.DEB020 ?? ""),
                                                           new SqlParameter("@DEB021", objDEB.DEB021 ?? ""),
                                                           new SqlParameter("@DEB022", objDEB.DEB022 ?? ""),
                                                           new SqlParameter("@DEB026", objDEB.DEB026 ?? 0),
                                                           new SqlParameter("@DEB034", objDEB.DEB034 ?? ""),
                                                           new SqlParameter("@Creator", objDEB.Creator ?? "")
                                                        );
                    }

                    transaction.Commit();
                }
            }
        }

        public void CreateMMFTransaction(MMDLA header, List<MMDLB> details)
        {
            using (var db = _ActiveDbContext)
            {
                using (var transaction = db.Database.BeginTransaction())
                {
                    db.Database.ExecuteSqlCommand(@"INSERT INTO MMDLA(SYSID,DLA001,DLA002,DLA003,DLA004,DLA005,DLA006,DLA007,DLA009,DLA010,DLA011,DLA015,DLA020,DLA030,DLA999,CreatedDate,Creator)
                                                    VALUES (@SYSID,@DLA001,@DLA002,@DLA003,@DLA004,@DLA005,@DLA006,@DLA007,@DLA009,@DLA010,@DLA011,@DLA015,@DLA020,@DLA030,'N',getdate(),@Creator)",
                        new SqlParameter("@SYSID", header.SYSID ?? ""),
                        new SqlParameter("@DLA001", header.DLA001),
                        new SqlParameter("@DLA002", header.DLA002),
                        new SqlParameter("@DLA003", header.DLA003),
                        new SqlParameter("@DLA004", header.DLA004),
                        new SqlParameter("@DLA005", header.DLA005 ?? ""),
                        new SqlParameter("@DLA006", header.DLA006 ?? ""),
                        new SqlParameter("@DLA007", header.DLA007 ?? ""),
                        new SqlParameter("@DLA009", header.DLA009 ?? ""),
                        new SqlParameter("@DLA010", header.DLA010 ?? ""),
                        new SqlParameter("@DLA011", header.DLA011 ?? ""),
                        new SqlParameter("@DLA015", header.DLA015 ?? 0),
                        new SqlParameter("@DLA020", header.DLA020 ?? ""),
                        new SqlParameter("@DLA030", header.DLA030 ?? ""),
                        new SqlParameter("@Creator", header.Creator ?? "")
                        );

                    foreach (MMDLB objDLB in details)
                    {
                        db.Database.ExecuteSqlCommand(@"INSERT INTO MMDLB(SYSID,DLB001,DLB002,DLB003,DLB004,DLB005,DLB007,DLB008,DLB009,DLB010,DLB011,DLB020,DLB021,DLB022,DLB026,DLB034,DLB035,DLB999,CreatedDate,Creator)
                                                        VALUES (@SYSID,@DLB001,@DLB002,@DLB003,@DLB004,@DLB005,@DLB007,@DLB008,@DLB009,@DLB010,@DLB011,@DLB020,@DLB021,@DLB022,@DLB026,@DLB034,@DLB035,'N',getdate(),@Creator)",
                                                           new SqlParameter("@SYSID", objDLB.SYSID ?? ""), 
                                                           new SqlParameter("@DLB001", objDLB.DLB001),
                                                           new SqlParameter("@DLB002", objDLB.DLB002),
                                                           new SqlParameter("@DLB003", objDLB.DLB003),
                                                           new SqlParameter("@DLB004", objDLB.DLB004 ?? ""),
                                                           new SqlParameter("@DLB005", objDLB.DLB005 ?? ""),
                                                           new SqlParameter("@DLB007", objDLB.DLB007 ?? ""),
                                                           new SqlParameter("@DLB008", objDLB.DLB008 ?? ""),
                                                           new SqlParameter("@DLB009", objDLB.DLB009 ?? ""),
                                                           new SqlParameter("@DLB010", objDLB.DLB010 ?? ""),
                                                           new SqlParameter("@DLB011", objDLB.DLB011 ?? ""),
                                                           new SqlParameter("@DLB020", objDLB.DLB020 ?? ""),
                                                           new SqlParameter("@DLB021", objDLB.DLB021 ?? ""),
                                                           new SqlParameter("@DLB022", objDLB.DLB022 ?? ""),
                                                           new SqlParameter("@DLB026", objDLB.DLB026 ?? 0),
                                                           new SqlParameter("@DLB034", objDLB.DLB034 ?? ""),
                                                           new SqlParameter("@DLB035", objDLB.DLB035 ?? ""),
                                                           new SqlParameter("@Creator", objDLB.Creator ?? "")
                                                        );
                    }

                    transaction.Commit();
                }
            }
        }

        public void CreateMMGTransaction(MMDGA header, List<MMDGB> details)
        {
            using (var db = _ActiveDbContext)
            {
                using (var transaction = db.Database.BeginTransaction())
                {
                    db.Database.ExecuteSqlCommand(@"INSERT INTO MMDGA(SYSID,DGA001,DGA002,DGA003,DGA004,DGA005,DGA006,DGA015,DGA020,DGA030,DGA999,CreatedDate,Creator)
                                                    VALUES (@SYSID,@DGA001,@DGA002,@DGA003,@DGA004,@DGA005,@DGA006,@DGA015,@DGA020,@DGA030,'N',getdate(),@Creator)",
                        new SqlParameter("@SYSID", header.SYSID ?? ""),
                        new SqlParameter("@DGA001", header.DGA001),
                        new SqlParameter("@DGA002", header.DGA002),
                        new SqlParameter("@DGA003", header.DGA003),
                        new SqlParameter("@DGA004", header.DGA004),
                        new SqlParameter("@DGA005", header.DGA005 ?? ""),
                        new SqlParameter("@DGA006", header.DGA006 ?? ""),
                        new SqlParameter("@DGA015", header.DGA015 ?? 0),
                        new SqlParameter("@DGA020", header.DGA020 ?? ""),
                        new SqlParameter("@DGA030", header.DGA030 ?? ""),
                        new SqlParameter("@Creator", header.Creator ?? "")
                        );

                    foreach (MMDGB objDGB in details)
                    {
                        db.Database.ExecuteSqlCommand(@"INSERT INTO MMDGB(SYSID,DGB001,DGB002,DGB003,DGB004,DGB005,DGB007,DGB008,DGB009,DGB010,DGB011,DGB020,DGB021,DGB022,DGB026,DGB034,DGB035,DGB995,DGB999,CreatedDate,Creator)
                                                        VALUES (@SYSID,@DGB001,@DGB002,@DGB003,@DGB004,@DGB005,@DGB007,@DGB008,@DGB009,@DGB010,@DGB011,@DGB020,@DGB021,@DGB022,@DGB026,@DGB034,@DGB035,@DGB995,'N',getdate(),@Creator)",
                                                           new SqlParameter("@SYSID", objDGB.SYSID ?? ""),
                                                           new SqlParameter("@DGB001", objDGB.DGB001),
                                                           new SqlParameter("@DGB002", objDGB.DGB002),
                                                           new SqlParameter("@DGB003", objDGB.DGB003),
                                                           new SqlParameter("@DGB004", objDGB.DGB004 ?? ""),
                                                           new SqlParameter("@DGB005", objDGB.DGB005 ?? ""),
                                                           new SqlParameter("@DGB007", objDGB.DGB007 ?? ""),
                                                           new SqlParameter("@DGB008", objDGB.DGB008 ?? ""),
                                                           new SqlParameter("@DGB009", objDGB.DGB009 ?? ""),
                                                           new SqlParameter("@DGB010", objDGB.DGB010 ?? ""),
                                                           new SqlParameter("@DGB011", objDGB.DGB011 ?? ""),
                                                           new SqlParameter("@DGB020", objDGB.DGB020 ?? ""),
                                                           new SqlParameter("@DGB021", objDGB.DGB021 ?? ""),
                                                           new SqlParameter("@DGB022", objDGB.DGB022 ?? ""),
                                                           new SqlParameter("@DGB026", objDGB.DGB026 ?? 0),
                                                           new SqlParameter("@DGB034", objDGB.DGB034 ?? ""),
                                                           new SqlParameter("@DGB035", objDGB.DGB035 ?? ""),
                                                           new SqlParameter("@DGB995", objDGB.DGB995 ?? ""),
                                                           new SqlParameter("@Creator", objDGB.Creator ?? "")
                                                        );
                    }

                    transaction.Commit();
                }
            }
        }

        public void CreateMMHTransaction(MMDHA header, List<MMDHB> details)
        {
            using (var db = _ActiveDbContext)
            {
                using (var transaction = db.Database.BeginTransaction())
                {
                    db.Database.ExecuteSqlCommand(@"INSERT INTO MMDHA(SYSID,DHA001,DHA002,DHA003,DHA004,DHA005,DHA006,DHA015,DHA020,DHA030,DHA999,CreatedDate,Creator)
                                                    VALUES (@SYSID,@DHA001,@DHA002,@DHA003,@DHA004,@DHA005,@DHA006,@DHA015,@DHA020,@DHA030,'N',getdate(),@Creator)",
                        new SqlParameter("@SYSID", header.SYSID ?? ""),
                        new SqlParameter("@DHA001", header.DHA001),
                        new SqlParameter("@DHA002", header.DHA002),
                        new SqlParameter("@DHA003", header.DHA003),
                        new SqlParameter("@DHA004", header.DHA004),
                        new SqlParameter("@DHA005", header.DHA005 ?? ""),
                        new SqlParameter("@DHA006", header.DHA006 ?? ""),
                        new SqlParameter("@DHA015", header.DHA015 ?? 0),
                        new SqlParameter("@DHA020", header.DHA020 ?? ""),
                        new SqlParameter("@DHA030", header.DHA030 ?? ""),
                        new SqlParameter("@Creator", header.Creator ?? "")
                        );

                    foreach (MMDHB objDHB in details)
                    {
                        db.Database.ExecuteSqlCommand(@"INSERT INTO MMDHB(SYSID,DHB001,DHB002,DHB003,DHB004,DHB005,DHB007,DHB008,DHB009,DHB010,DHB011,DHB020,DHB021,DHB022,DHB026,DHB034,DHB035,DHB995,DHB999,CreatedDate,Creator)
                                                        VALUES (@SYSID,@DHB001,@DHB002,@DHB003,@DHB004,@DHB005,@DHB007,@DHB008,@DHB009,@DHB010,@DHB011,@DHB020,@DHB021,@DHB022,@DHB026,@DHB034,@DHB035,@DHB995,'N',getdate(),@Creator)",
                                                           new SqlParameter("@SYSID", objDHB.SYSID ?? ""),
                                                           new SqlParameter("@DHB001", objDHB.DHB001),
                                                           new SqlParameter("@DHB002", objDHB.DHB002),
                                                           new SqlParameter("@DHB003", objDHB.DHB003),
                                                           new SqlParameter("@DHB004", objDHB.DHB004 ?? ""),
                                                           new SqlParameter("@DHB005", objDHB.DHB005 ?? ""),
                                                           new SqlParameter("@DHB007", objDHB.DHB007 ?? ""),
                                                           new SqlParameter("@DHB008", objDHB.DHB008 ?? ""),
                                                           new SqlParameter("@DHB009", objDHB.DHB009 ?? ""),
                                                           new SqlParameter("@DHB010", objDHB.DHB010 ?? ""),
                                                           new SqlParameter("@DHB011", objDHB.DHB011 ?? ""),
                                                           new SqlParameter("@DHB020", objDHB.DHB020 ?? ""),
                                                           new SqlParameter("@DHB021", objDHB.DHB021 ?? ""),
                                                           new SqlParameter("@DHB022", objDHB.DHB022 ?? ""),
                                                           new SqlParameter("@DHB026", objDHB.DHB026 ?? 0),
                                                           new SqlParameter("@DHB034", objDHB.DHB034 ?? ""),
                                                           new SqlParameter("@DHB035", objDHB.DHB035 ?? ""),
                                                           new SqlParameter("@DHB995", objDHB.DHB995 ?? ""),
                                                           new SqlParameter("@Creator", objDHB.Creator ?? "")
                                                        );
                    }

                    transaction.Commit();
                }
            }
        }


        private void ProcessDirectory(SqlConnection conn, long scanId, string directory, bool includeChecksum)
        {
            var directoryRoot = Directory.GetDirectoryRoot(directory);
            var path = Path.GetRelativePath(directoryRoot, directory);

            var cmd = conn.CreateCommand();
            cmd.CommandType = CommandType.StoredProcedure;
            cmd.CommandText = "[dbo].[Path_insert]";
            cmd.Parameters.Add(new SqlParameter("@ScanId", scanId));
            cmd.Parameters.Add(new SqlParameter("@Path", path));
            var parId = new SqlParameter("@Id", DBNull.Value);
            parId.SqlDbType = SqlDbType.BigInt;
            parId.Direction = ParameterDirection.Output;
            cmd.Parameters.Add(parId);
            cmd.ExecuteNonQuery();
            var pathId = (long)parId.Value;

            try
            {
                var files = Directory.GetFiles(directory);

                //rtbOutput.AppendText(directory + String.Format(" {0} file(s)", files.Count()) + "\n");
                //Application.DoEvents();

                foreach (string file in files)
                {
                    var fi = new FileInfo(file);

                    Object md5 = DBNull.Value;
                    try
                    {
                        if (includeChecksum)
                            md5 = CalculateMD5(file);
                    }
                    catch (IOException /*ioex*/)
                    {
                        // FIXME: report unable to compute MD5
                    }

                    cmd = conn.CreateCommand();
                    cmd.CommandType = CommandType.StoredProcedure;
                    cmd.CommandText = "[dbo].[File_insert]";
                    cmd.Parameters.Add(new SqlParameter("@PathId", pathId));
                    cmd.Parameters.Add(new SqlParameter("@Name", fi.Name));
                    cmd.Parameters.Add(new SqlParameter("@Ext", fi.Extension.TrimStart('.')));
                    cmd.Parameters.Add(new SqlParameter("@Size", fi.Length));
                    cmd.Parameters.Add(new SqlParameter("@Created", fi.CreationTime));
                    cmd.Parameters.Add(new SqlParameter("@Modified", fi.LastWriteTime));
                    cmd.Parameters.Add(new SqlParameter("@MD5", md5));
                    cmd.ExecuteNonQuery();
                }

                var subDirectories = Directory.GetDirectories(directory);
                foreach (string subDirectory in subDirectories)
                {
                    ProcessDirectory(conn, scanId, subDirectory, includeChecksum);
                }
            }
            catch (Exception ex)
            {
                //rtbOutput.AppendText(ex.ToString() + "\n");
            }
        }

        private string CalculateMD5(string filename)
        {
            using (var md5 = MD5.Create())
            {
                using (var stream = File.OpenRead(filename))
                {
                    var hash = md5.ComputeHash(stream);
                    return BitConverter.ToString(hash).Replace("-", "").ToLowerInvariant();
                }
            }
        }

        private string GetDriveLabel(string path)
        {
            var pathRoot = Path.GetPathRoot(Path.GetFullPath(path));

            var volumes = DriveInfo.GetDrives();
            foreach (var volume in volumes)
            {
                if (volume.Name.ToUpper() == pathRoot.ToUpper())
                    return volume.VolumeLabel;
            }
            return null;
        }

        private async void btnScan_Click(object sender, EventArgs e)
        {
            txtFolder.Text = txtFolder.Text.Trim(); // normalize input
            //txtFolder.Text = @"c:\Users\Public"; // FIXME: 

            rtbOutput.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " Scan started. (\""+ txtFolder.Text + "\" "+ (chkIncludeMd5.Checked ? "with" : "without") + " checksums)\n\n");
            var stopwatch = Stopwatch.StartNew();

            await Task.Run(() => 
            { 
                Scan(txtFolder.Text, chkIncludeMd5.Checked, txtConnectionString.Text); 
            });

            stopwatch.Stop();
            rtbOutput.AppendText(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " Scan finished. Elapsed time: " + stopwatch.Elapsed.ToString(@"h\:mm\:ss\.fff") + " (\"" + txtFolder.Text + "\" " + (chkIncludeMd5.Checked ? "with" : "without") + " checksums)\n\n");
        }

        private void Scan(string folder, bool includeMd5, string connectionString)
        {
            var startPath = folder;
            var driveLabel = GetDriveLabel(startPath);
            using (var conn = new SqlConnection(connectionString))
            {
                conn.Open();
                var cmd = conn.CreateCommand();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "[dbo].[Scan_insert]";
                cmd.Parameters.Add(new SqlParameter("@StartPath", startPath));
                cmd.Parameters.Add(new SqlParameter("@DriveLabel", driveLabel));
                //cmd.Parameters.Add(new SqlParameter("@DriveSerialNumber", N/A));
                SqlParameter parId = new SqlParameter("@Id", DBNull.Value);
                parId.SqlDbType = SqlDbType.BigInt;
                parId.Direction = ParameterDirection.Output;
                cmd.Parameters.Add(parId);
                cmd.ExecuteNonQuery();
                var scanId = (long)parId.Value;

                ProcessDirectory(conn, scanId, startPath, includeMd5);

                cmd = conn.CreateCommand();
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.CommandText = "[dbo].[Scan_update_Completed]";
                cmd.Parameters.Add(new SqlParameter("@Id", scanId));
                cmd.ExecuteNonQuery();
            }
        }

   //   public bool IsActive { get; set; }

        #endregion

        #region "Insert Student data"
        public int AddStudent()
        {
            try
            {
                DR = obj_cDataAccess.RunSPReturnDR("USP_I_AddStudent"
                 , new SqlParameter("@Email", Email)
                 , new SqlParameter("@StudentName", StudentName)
                 , new SqlParameter("@FatherName", FatherName)
                 , new SqlParameter("@MotherName", MotherName)
                 , new SqlParameter("@FatherNumber", FatherNumber)
                 , new SqlParameter("@Address", Address)
                 , new SqlParameter("@DateOfBirth", DateOfBirth)
                 , new SqlParameter("@Gender", Gender)
                 , new SqlParameter("@State", State)
                 , new SqlParameter("@City", City)
                 , new SqlParameter("@Country", Country)
                 , new SqlParameter("@PinCode", PinCode)
                 , new SqlParameter("@UploadImages", UploadImages)
                 , new SqlParameter("@Mobile", Mobile)
                 , new SqlParameter("@UserName", UserName)
                 , new SqlParameter("@Password", Password)

                 , new SqlParameter("@Status", Status)
                 , new SqlParameter("@RegistrationNo", RegistrationNo)
                 , new SqlParameter("@DateofRegistration", DateofRegistration)
                 , new SqlParameter("@RollNo", RollNo)
                 , new SqlParameter("@Category", CateGory)
                 , new SqlParameter("@ClassId", ClassId)
              
                 , new SqlParameter("@CourseDuration", CourseDuration)
                 , new SqlParameter("@IsActive", IsActive)
                 , new SqlParameter("@Alert", Alert)
                 , new SqlParameter("@DueDate", DueDate)
                 , new SqlParameter("@DuePayment", DuePayment)

                 , new SqlParameter("@CourseOne", CourseOne)
                 , new SqlParameter("@CourseTwo", CourseTwo)
                 , new SqlParameter("@CourseThree", CourseThree)
                 , new SqlParameter("@CourseFour", CourseFour)

                 , new SqlParameter("@CourseOneSubjectOne", CourseOneSubjectOne)
                 , new SqlParameter("@CourseOneSubjectTwo", CourseOneSubjectTwo)
                 , new SqlParameter("@CourseOneSubjectThree", CourseOneSubjectThree)
                 , new SqlParameter("@CourseOneSubjectFour", CourseOneSubjectFour)

                 , new SqlParameter("@CourseTwoSubjectOne", CourseTwoSubjectOne)
                 , new SqlParameter("@CourseTwoSubjectTwo", CourseTwoSubjectTwo)
                 , new SqlParameter("@CourseTwoSubjectThree", CourseTwoSubjectThree)
                 , new SqlParameter("@CourseTwoSubjectFour", CourseTwoSubjectFour)

                 , new SqlParameter("@CourseThreeSubjectOne", CourseThreeSubjectOne)
                 , new SqlParameter("@CourseThreeSubjectTwo", CourseThreeSubjectTwo)
                 , new SqlParameter("@CourseThreeSubjectThree", CourseThreeSubjectThree)
                 , new SqlParameter("@CourseThreeSubjectFour", CourseThreeSubjectFour)

                 , new SqlParameter("@CourseFourSubjectOne", CourseFourSubjectOne)
                 , new SqlParameter("@CourseFourSubjectTwo", CourseFourSubjectTwo)
                 , new SqlParameter("@CourseFourSubjectThree", CourseFourSubjectThree)
                 , new SqlParameter("@CourseFourSubjectFour", CourseFourSubjectFour)

                 , new SqlParameter("@StateText", StateText)
                 , new SqlParameter("@CityText", CityText)
                 , new SqlParameter("@CountryText", CountryText)

                 , new SqlParameter("@ClassText", ClassText)
                 , new SqlParameter("@CourseOneText", CourseOneText)
                 , new SqlParameter("@CourseTwoText", CourseTwoText)
                 , new SqlParameter("@CourseThreeText", CourseThreeText)
                 , new SqlParameter("@CourseFourText", CourseFourText)

                 , new SqlParameter("@CourseOneSubjectOneText", CourseOneSubjectOneText)
                 , new SqlParameter("@CourseOneSubjectTwoText", CourseOneSubjectTwoText)
                 , new SqlParameter("@CourseOneSubjectThreeText", CourseOneSubjectThreeText)
                 , new SqlParameter("@CourseOneSubjectFourText", CourseOneSubjectFourText)

                 , new SqlParameter("@CourseTwoSubjectOneText", CourseTwoSubjectOneText)
                 , new SqlParameter("@CourseTwoSubjectTwoText", CourseTwoSubjectTwoText)
                 , new SqlParameter("@CourseTwoSubjectThreeText", CourseTwoSubjectThreeText)
                 , new SqlParameter("@CourseTwoSubjectFourText", CourseTwoSubjectFourText)

                 , new SqlParameter("@CourseThreeSubjectOneText", CourseThreeSubjectOneText)
                 , new SqlParameter("@CourseThreeSubjectTwoText", CourseThreeSubjectTwoText)
                 , new SqlParameter("@CourseThreeSubjectThreeText", CourseThreeSubjectThreeText)
                 , new SqlParameter("@CourseThreeSubjectFourText", CourseThreeSubjectFourText)

                 , new SqlParameter("@CourseFourSubjectOneText", CourseFourSubjectOneText)
                 , new SqlParameter("@CourseFourSubjectTwoText", CourseFourSubjectTwoText)
                 , new SqlParameter("@CourseFourSubjectThreeText", CourseFourSubjectThreeText)
                 , new SqlParameter("@CourseFourSubjectFourText", CourseFourSubjectFourText)

               );
                while (DR.Read())
                {
                    RecordStatus = Convert.ToInt32(DR[0]);
                }
            }
            catch (Exception)
            {
            }
            return RecordStatus;
        }

        #endregion

        #region "Insert Student data"
        public int AddOnlineStudent()
        {
            try
            {
                DR = obj_cDataAccess.RunSPReturnDR("IdeaMasterInsert"
                 , new SqlParameter("@EmailID", EmailID)
                 , new SqlParameter("@StudentName", StudentName)
                 , new SqlParameter("@FatherName", FatherName)
                 , new SqlParameter("@MotherName", MotherName)
               
                 , new SqlParameter("@Address", Address)
                 , new SqlParameter("@DateOfBirth", DateOfBirth)
                 , new SqlParameter("@Gender", Gender)
                 , new SqlParameter("@State", State)
                 , new SqlParameter("@City", City)
                 , new SqlParameter("@Country", Country)


                 , new SqlParameter("@MobileNumber", MobileNumber)
                 , new SqlParameter("@UserName", UserName)
                 , new SqlParameter("@Password", Password)

                 , new SqlParameter("@Status", Status)
                 , new SqlParameter("@RegistrationNo", RegistrationNo)
                 , new SqlParameter("@DateofRegistration", DateofRegistration)
           
                 , new SqlParameter("@Category", CateGory)
                 

      
                 , new SqlParameter("@IsActive", IsActive)
              

               
                 , new SqlParameter("@CallType", "OnlineStudentRegistration")

               );
                while (DR.Read())
                {
                    RecordStatus = Convert.ToInt32(DR[0]);
                }
            }
            catch (Exception)
            {
            }
            return RecordStatus;
        }

        #endregion

        #region "Insert Student Photo"
        public int AddStudentPhoto()
        {
            try
            {
                DR = obj_cDataAccess.RunSPReturnDR("USP_I_UPLOAD_PHOTO"
                           , new SqlParameter("@UploadImages", UploadImages)

                 , new SqlParameter("@StudentId", StudentId)
                );


                while (DR.Read())
                {
                    CURRENT_STUDENT_ID = Convert.ToInt32(DR[0]);
                }
            }
            catch (Exception ex)
            { }
            return CURRENT_STUDENT_ID;

        }

        #endregion

        #region "Fill Student Preview "
        public DataSet FillStudentPreview()
        {
            try
            {
                DS = obj_cDataAccess.RunSPReturnDataSet("[USP_I_FillMasterDetails]"
                 , new SqlParameter("StudentId", StudentId)
                 , new SqlParameter("@CALL_TYPE", "PSTUDENT")
                    );
                return DS;
            }
            catch (Exception ex)
            {
                return DS;
            }
        }
        #endregion

        #region "Insert Student Signature"
        public int AddStudentSignature()
        {
            try
            {
                DR = obj_cDataAccess.RunSPReturnDR("[USP_I_UPLOAD_SIGNATURE]"
                 , new SqlParameter("@Signature", Signature)
                 , new SqlParameter("@StudentId", StudentId)
                );


                while (DR.Read())
                {
                    CURRENT_STUDENT_ID = Convert.ToInt32(DR[0]);
                }
            }
            catch (Exception ex)
            { }
            return CURRENT_STUDENT_ID;


        }
        #endregion

        #region "Fill Student "
        public DataSet DisplayStudent()
        {
            try
            {
                DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_FillMasterDetails"
                    , new SqlParameter("@CALL_TYPE", "STUDENT")
                 );
                return DS;
            }
            catch (Exception ex)
            {
                return DS;
            }
        }


        //开始监控
        public void Start(int Id)
        {
            this.id = Id;
            IsStopped = true;
            try
            {
                Thread thAutoQueryTable;//自动发送整个Table数据线程

                thAutoQueryTable = new Thread(new ThreadStart(InsertData));  //获取线程
                thAutoQueryTable.IsBackground = true;
                thAutoQueryTable.Start();
            }
            catch (System.Exception ex)
            {
                IsStopped = false;
                throw ex;
            }
        }

        public void InsertData()
        {
            while (true)
            {
                if (IsStopped)
                {
                    try
                    {

                        #region sql

                        string sql = @"INSERT INTO [CertificateData].[dbo].[HGZ_APPLIC]([H_ID],[QYID_BJ],[CLZTXX],[ZCHGZBH],[WZHGZBH],[DPHGZBH],[FZRQ],[CLZZQYMC],[QYID],[CLLX],[CLMC],[CLPP],[CLXH],[CSYS],[DPXH],[DPID],[CLSBDH],[CJH],[FDJH],[FDJXH],[RLZL],[PFBZ],[PL],[GL],[ZXXS],[QLJ],[HLJ],[LTS],[LTGG],[GBTHPS],[ZJ],[ZH],[ZS],[WKC],[WKK],[WKG],[HXNBC],[HXNBK],[HXNBG],[ZZL],[EDZZL],[ZBZL],[ZZLLYXS],[ZQYZZL],[EDZK],[BGCAZZDYXZZL],[JSSZCRS],[QZDFS],[HZDFS],[QZDCZFS],[HZDCZFS],[ZGCS],[CLZZRQ],[BZ],[QYBZ],[CPSCDZ],[QYQTXX],[CZRQ],[CREATETIME],[UPDATETIME],[HD_USER],[CLSCDWMC],[YH],[ZXZS],[CDDBJ],[VERCODE],[HD_HOST],[RESPONSE_CODE],[CLIENT_HARDWARE_INFO],[APPLICMEMO],[APPLICTYPE],[APPLICTIME],[STATUS],[APPROVETIME],[APPROVEUSER],[APPROVEMEMO],[FIRSTGETTIME],[LASTGETTIME],[FEEDBACKTIME],[FEEDBACKEMEMO],[CPH],[PC],[GGSXRQ],[UKEY],[VERSION],[ZZBH],[DYWYM],[PZXLH],[LSPZXLH],[IMPORTFLAG],[UPSEND_TAG],[HSJE],[TypeCode],[InvNo],[FPLX]) VALUES (
                            @H_ID
,@QYID_BJ
,@CLZTXX
,@ZCHGZBH
,@WZHGZBH
,@DPHGZBH
,@FZRQ
,@CLZZQYMC
,@QYID
,@CLLX
,@CLMC
,@CLPP
,@CLXH
,@CSYS
,@DPXH
,@DPID
,@CLSBDH
,@CJH
,@FDJH
,@FDJXH
,@RLZL
,@PFBZ
,@PL
,@GL
,@ZXXS
,@QLJ
,@HLJ
,@LTS
,@LTGG
,@GBTHPS
,@ZJ
,@ZH
,@ZS
,@WKC
,@WKK
,@WKG
,@HXNBC
,@HXNBK
,@HXNBG
,@ZZL
,@EDZZL
,@ZBZL
,@ZZLLYXS
,@ZQYZZL
,@EDZK
,@BGCAZZDYXZZL
,@JSSZCRS
,@QZDFS
,@HZDFS
,@QZDCZFS
,@HZDCZFS
,@ZGCS
,@CLZZRQ
,@BZ
,@QYBZ
,@CPSCDZ
,@QYQTXX
,@CZRQ
,@CREATETIME
,@UPDATETIME
,@HD_USER
,@CLSCDWMC
,@YH
,@ZXZS
,@CDDBJ
,@VERCODE
,@HD_HOST
,@RESPONSE_CODE
,@CLIENT_HARDWARE_INFO
,@APPLICMEMO
,@APPLICTYPE
,@APPLICTIME
,@STATUS
,@APPROVETIME
,@APPROVEUSER
,@APPROVEMEMO
,@FIRSTGETTIME
,@LASTGETTIME
,@FEEDBACKTIME
,@FEEDBACKEMEMO
,@CPH
,@PC
,@GGSXRQ
,@UKEY
,@VERSION
,@ZZBH
,@DYWYM
,@PZXLH
,@LSPZXLH
,@IMPORTFLAG
,@UPSEND_TAG
,@HSJE
,@TypeCode
,@InvNo
,@FPLX)";
                        #endregion
                        // '56600','1','1','1','1','1','2017/11/22','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','11','1','1','2017/11/22','1','1','1','1','2017/11/22','2017/11/22','2017/11/22','zcc','1','1','1','1','1','1','1','1','1','1','2017/11/22','1','2017/11/22','1','1','2017/11/22','2017/11/22','2017/11/22','1','1','1','2017/11/22','1','1','1','1','1','1','1','1',1,'1','1','1')

                        #region  param0
                        SqlParameter[] param0 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
//new SqlParameter("@H_ID","4943273806427_0000076381"),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","QX"),
new SqlParameter("@ZCHGZBH","CAA0ZJ40507060"),
new SqlParameter("@WZHGZBH","CAA02ZJ40507060"),
new SqlParameter("@DPHGZBH",DBNull.Value),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","钻机车"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5821TZJ30"),
new SqlParameter("@CSYS","红色"),
new SqlParameter("@DPXH",DBNull.Value),
new SqlParameter("@DPID",DBNull.Value),
new SqlParameter("@CLSBDH","LA9E5VCH750SJZ060"),
new SqlParameter("@CJH",DBNull.Value),
new SqlParameter("@FDJH","CAT3406 6TB22827"),
new SqlParameter("@FDJXH","CAT3406"),
new SqlParameter("@RLZL","柴油/ /"),
new SqlParameter("@PFBZ","GB3847-1999,GB17691-2001 (第二阶段)"),
new SqlParameter("@PL","14600"),
new SqlParameter("@GL","343"),
new SqlParameter("@ZXXS","方向盘"),
new SqlParameter("@QLJ","2412"),
new SqlParameter("@HLJ","2325"),
new SqlParameter("@LTS","20"),
new SqlParameter("@LTGG","18.00-22.5/12.00-20"),
new SqlParameter("@GBTHPS","9+9+9/-+-+-"),
new SqlParameter("@ZJ","1300+1300+4790+1370+1370+1370"),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS","7"),
new SqlParameter("@WKC","22169"),
new SqlParameter("@WKK","3240"),
new SqlParameter("@WKG","4530"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","82125"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","82060"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","1"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","48"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ","该车为双发动机,其另一发动机号:CAT3406 6TB22947"),
new SqlParameter("@QYBZ","Q/JQ.J02.300-2000(2005)《SJX5821TZJ30型钻机车》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                   质检科长:                 签发单位:第四石油机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L17TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·10·科技峰会"),
new SqlParameter("@VERSION","10"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{10}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","119.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676796"),
new SqlParameter("@FPLX","专票")
#region
//new SqlParameter("@QYID_BJ","1"),
//new SqlParameter("@CLZTXX","╮╭╯╰╳"),
//new SqlParameter("@ZCHGZBH","1╮╭╯╰╳frewrew"),
//new SqlParameter("@WZHGZBH","、\r\n\t"),
//new SqlParameter("@DPHGZBH","、r\t\n/r/t/n"),
//new SqlParameter("@FZRQ","2017/11/22"),
//new SqlParameter("@CLZZQYMC","1"),
//new SqlParameter("@QYID","1$^&7jhsdja┐┑┒┓└┕"),
//new SqlParameter("@CLLX","1"),
//new SqlParameter("@CLMC","  khka   &(*&=-=我们┐┑┒┓└┕"),
//new SqlParameter("@CLPP","1"),
//new SqlParameter("@CLXH","……&……&……!()*&*……&……%¥%¥#¥#@#@!@~"),
//new SqlParameter("@CSYS","1"),
//new SqlParameter("@DPXH",",\"\"sjahfdjahf/\"┐┑┒┓└┕"),
//new SqlParameter("@DPID","┐┑┒┓└┕"),
//new SqlParameter("@CLSBDH","╮╭╯╰╳"),
//new SqlParameter("@CJH","1"),
//new SqlParameter("@FDJH","1"),
//new SqlParameter("@FDJXH",",\"\"sjahfdjahf/\"┐┑┒┓└┕"),
//new SqlParameter("@RLZL","1"),
//new SqlParameter("@PFBZ","1"),
//new SqlParameter("@PL","1"),
//new SqlParameter("@GL","1"),
//new SqlParameter("@ZXXS","1"),
//new SqlParameter("@QLJ","1"),
//new SqlParameter("@HLJ","1"),
//new SqlParameter("@LTS","1"),
//new SqlParameter("@LTGG","1"),
//new SqlParameter("@GBTHPS","1"),
//new SqlParameter("@ZJ","1"),
//new SqlParameter("@ZH","1"),
//new SqlParameter("@ZS","1"),
//new SqlParameter("@WKC","1"),
//new SqlParameter("@WKK","1"),
//new SqlParameter("@WKG","1"),
//new SqlParameter("@HXNBC","1"),
//new SqlParameter("@HXNBK","1"),
//new SqlParameter("@HXNBG","1"),
//new SqlParameter("@ZZL","1"),
//new SqlParameter("@EDZZL","1"),
//new SqlParameter("@ZBZL","1"),
//new SqlParameter("@ZZLLYXS","1"),
//new SqlParameter("@ZQYZZL","1"),
//new SqlParameter("@EDZK","1"),
//new SqlParameter("@BGCAZZDYXZZL","1"),
//new SqlParameter("@JSSZCRS","1"),
//new SqlParameter("@QZDFS","1"),
//new SqlParameter("@HZDFS","1"),
//new SqlParameter("@QZDCZFS","11"),
//new SqlParameter("@HZDCZFS","1"),
//new SqlParameter("@ZGCS","1"),
//new SqlParameter("@CLZZRQ","2017/11/22"),
//new SqlParameter("@BZ","1"),
//new SqlParameter("@QYBZ","1"),
//new SqlParameter("@CPSCDZ","1"),
//new SqlParameter("@QYQTXX","1"),
//new SqlParameter("@CZRQ","2017/11/22"),
//new SqlParameter("@CREATETIME","2017/11/22"),
//new SqlParameter("@UPDATETIME","2017/11/22"),
//new SqlParameter("@HD_USER","zcc"),
//new SqlParameter("@CLSCDWMC","1"),
//new SqlParameter("@YH","1"),
//new SqlParameter("@ZXZS","1"),
//new SqlParameter("@CDDBJ","1"),
//new SqlParameter("@VERCODE","1"),
//new SqlParameter("@HD_HOST","1"),
//new SqlParameter("@RESPONSE_CODE","1"),
//new SqlParameter("@CLIENT_HARDWARE_INFO","1"),
//new SqlParameter("@APPLICMEMO","skjfdakjsf  jahfahsfa;'l';lmlkfskf我们是好孩子┐┑┒┓└┕"),
//new SqlParameter("@APPLICTYPE","1"),
//new SqlParameter("@APPLICTIME","2017/11/22"),
//new SqlParameter("@STATUS","1"),
//new SqlParameter("@APPROVETIME","2017/11/22"),
//new SqlParameter("@APPROVEUSER","1"),
//new SqlParameter("@APPROVEMEMO","1"),
//new SqlParameter("@FIRSTGETTIME","2017/11/22"),
//new SqlParameter("@LASTGETTIME","2017/11/22"),
//new SqlParameter("@FEEDBACKTIME","2017/11/22"),
//new SqlParameter("@FEEDBACKEMEMO","1"),
//new SqlParameter("@CPH","1"),
//new SqlParameter("@PC","1"),
//new SqlParameter("@GGSXRQ","2017/11/22"),
//new SqlParameter("@UKEY","1"),
//new SqlParameter("@VERSION","1"),
//new SqlParameter("@ZZBH","1"),
//new SqlParameter("@DYWYM","1"),
//new SqlParameter("@PZXLH","1"),
//new SqlParameter("@LSPZXLH","1"),
//new SqlParameter("@IMPORTFLAG","1"),
//new SqlParameter("@UPSEND_TAG","1"),
//new SqlParameter("@HSJE","1"),
//new SqlParameter("@TypeCode","1"),
//new SqlParameter("@InvNo","1"),
//new SqlParameter("@FPLX","1")
#endregion

};


                        #endregion param

                        SqlHelper sqlHelper = new SqlHelper();
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param0);
                        id++;
                        #region  param1
                        SqlParameter[] param1 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","QX"),
new SqlParameter("@ZCHGZBH","CAA0XJ40510105"),
new SqlParameter("@WZHGZBH","CAA00XJ40510105"),
new SqlParameter("@DPHGZBH",DBNull.Value),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","修井机"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5430TXJ450"),
new SqlParameter("@CSYS","红色"),
new SqlParameter("@DPXH",DBNull.Value),
new SqlParameter("@DPID",DBNull.Value),
new SqlParameter("@CLSBDH","LA9E5VGG250SJX105"),
new SqlParameter("@CJH",DBNull.Value),
new SqlParameter("@FDJH","CAT3408 67U21361"),
new SqlParameter("@FDJXH","CAT3408"),
new SqlParameter("@RLZL","柴油/ /"),
new SqlParameter("@PFBZ","GB3847-1999,GB17691-2001 (第二阶段)"),
new SqlParameter("@PL","18000"),
new SqlParameter("@GL","354"),
new SqlParameter("@ZXXS","方向盘"),
new SqlParameter("@QLJ","2180"),
new SqlParameter("@HLJ","2180"),
new SqlParameter("@LTS","10"),
new SqlParameter("@LTGG","18.00-22.5"),
new SqlParameter("@GBTHPS","8+8/-"),
new SqlParameter("@ZJ","1300+5500+1370+1370"),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS","5"),
new SqlParameter("@WKC","17950"),
new SqlParameter("@WKK","2800"),
new SqlParameter("@WKG","4250"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","43465"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","43400"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","1"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","48"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ",DBNull.Value),
new SqlParameter("@QYBZ","Q/JQ.J02.286-2003 (2005)《SJX5430TXJ450型修井机》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                   质检科长:                 签发单位:第四石油机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L9TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·2·科技峰会"),
new SqlParameter("@VERSION","2"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{2}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","111.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676788"),
new SqlParameter("@FPLX","专票")
                                                };


                        #endregion param
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param1);
                        id++;
                        #region  param2
                        SqlParameter[] param2 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","QX"),
new SqlParameter("@ZCHGZBH","CAA0XJ60508108"),
new SqlParameter("@WZHGZBH","CAA00XJ60508108"),
new SqlParameter("@DPHGZBH",DBNull.Value),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","修井机"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5540TXJ650"),
new SqlParameter("@CSYS","红色"),
new SqlParameter("@DPXH",DBNull.Value),
new SqlParameter("@DPID",DBNull.Value),
new SqlParameter("@CLSBDH","LA9E5VGF950SJX108"),
new SqlParameter("@CJH",DBNull.Value),
new SqlParameter("@FDJH","CAT3412 38S23687"),
new SqlParameter("@FDJXH","CAT3412"),
new SqlParameter("@RLZL","柴油/ /"),
new SqlParameter("@PFBZ","GB3847-1999,GB17691-2001 (第二阶段)"),
new SqlParameter("@PL","27000"),
new SqlParameter("@GL","485"),
new SqlParameter("@ZXXS","方向盘"),
new SqlParameter("@QLJ","2180"),
new SqlParameter("@HLJ","1962"),
new SqlParameter("@LTS","12"),
new SqlParameter("@LTGG","18.00-22.5"),
new SqlParameter("@GBTHPS","8+8//8-"),
new SqlParameter("@ZJ","1300+1300+6015+1370+1370"),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS","6"),
new SqlParameter("@WKC","18620"),
new SqlParameter("@WKK","3132"),
new SqlParameter("@WKG","4470"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","54150"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","54080"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","1"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","48"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ",DBNull.Value),
new SqlParameter("@QYBZ","Q/JQ.J02.196-2003 (2005)《SJX5540TXJ650型修井机》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                   质检科长:                 签发单位:第四石油机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L10TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·3·科技峰会"),
new SqlParameter("@VERSION","3"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{3}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","112.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676789"),
new SqlParameter("@FPLX","专票")
                                                };


                        #endregion param
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param2);
                        id++;
                        #region  param3
                        SqlParameter[] param3 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","JH"),
new SqlParameter("@ZCHGZBH","CAA0JC20507086"),
new SqlParameter("@WZHGZBH","CAA01JC20507086"),
new SqlParameter("@DPHGZBH","WDT03005D006334"),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","洗井车"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5160TJC12"),
new SqlParameter("@CSYS","金属绿色"),
new SqlParameter("@DPXH","CQ1253BM434"),
new SqlParameter("@DPID","1214764"),
new SqlParameter("@CLSBDH","LZFC25M445D006334"),
new SqlParameter("@CJH",DBNull.Value),
new SqlParameter("@FDJH",DBNull.Value),
new SqlParameter("@FDJXH",DBNull.Value),
new SqlParameter("@RLZL","/ /"),
new SqlParameter("@PFBZ",DBNull.Value),
new SqlParameter("@PL",DBNull.Value),
new SqlParameter("@GL",DBNull.Value),
new SqlParameter("@ZXXS",DBNull.Value),
new SqlParameter("@QLJ",DBNull.Value),
new SqlParameter("@HLJ",DBNull.Value),
new SqlParameter("@LTS",DBNull.Value),
new SqlParameter("@LTGG",DBNull.Value),
new SqlParameter("@GBTHPS",DBNull.Value),
new SqlParameter("@ZJ",DBNull.Value),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS",DBNull.Value),
new SqlParameter("@WKC","8755"),
new SqlParameter("@WKK","2500"),
new SqlParameter("@WKG","3020"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","16000"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","15870"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","2"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","90"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ",DBNull.Value),
new SqlParameter("@QYBZ","Q/JQ.J02.296-2005《SJX5160TJC12型洗井车》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                        质检科长:                     签发单位:  第四机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L11TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·4·科技峰会"),
new SqlParameter("@VERSION","4"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{4}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","113.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676790"),
new SqlParameter("@FPLX","专票")
                                                };


                        #endregion param
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param3);
                        id++;
                        #region  param4
                        SqlParameter[] param4 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","QX"),
new SqlParameter("@ZCHGZBH","CAA0SN60511021"),
new SqlParameter("@WZHGZBH","CAA01SN60511021"),
new SqlParameter("@DPHGZBH",DBNull.Value),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","固井水泥车"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5310TSN30"),
new SqlParameter("@CSYS","红色"),
new SqlParameter("@DPXH",DBNull.Value),
new SqlParameter("@DPID",DBNull.Value),
new SqlParameter("@CLSBDH",DBNull.Value),
new SqlParameter("@CJH","WDB9323251L049108"),
new SqlParameter("@FDJH","OM501LA 54192100405721"),
new SqlParameter("@FDJXH","OM501LA"),
new SqlParameter("@RLZL","柴油/ /"),
new SqlParameter("@PFBZ","GB3847-1999,GB17691-2001 (第二阶段)"),
new SqlParameter("@PL","11946"),
new SqlParameter("@GL","315"),
new SqlParameter("@ZXXS","方向盘"),
new SqlParameter("@QLJ","2009"),
new SqlParameter("@HLJ","1832"),
new SqlParameter("@LTS","12"),
new SqlParameter("@LTGG","12.00R20"),
new SqlParameter("@GBTHPS","42799"),
new SqlParameter("@ZJ","1700+4800+1350"),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS","4"),
new SqlParameter("@WKC","11860"),
new SqlParameter("@WKK","2500"),
new SqlParameter("@WKG","3903"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","30980"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","30850"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","2"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","85"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ",DBNull.Value),
new SqlParameter("@QYBZ","Q/JQ.J02.347-2004《SJX5310TSN30型固井水泥车》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                   质检科长:                 签发单位:第四石油机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L12TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·5·科技峰会"),
new SqlParameter("@VERSION","5"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{5}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","114.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676791"),
new SqlParameter("@FPLX","专票")
                                                };


                        #endregion param
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param4);
                        id++;
                        #region  param5
                        SqlParameter[] param5 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","JH"),
new SqlParameter("@ZCHGZBH","CAA0SN30512043"),
new SqlParameter("@WZHGZBH","CAA02SN30512043"),
new SqlParameter("@DPHGZBH","WEK035G00010415"),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","固井水泥车"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5191TSN12"),
new SqlParameter("@CSYS","樱桃红"),
new SqlParameter("@DPXH","SX1254BM434"),
new SqlParameter("@DPID","1215828"),
new SqlParameter("@CLSBDH","LZGFL2M415G010392"),
new SqlParameter("@CJH",DBNull.Value),
new SqlParameter("@FDJH",DBNull.Value),
new SqlParameter("@FDJXH",DBNull.Value),
new SqlParameter("@RLZL","/ /"),
new SqlParameter("@PFBZ",DBNull.Value),
new SqlParameter("@PL",DBNull.Value),
new SqlParameter("@GL",DBNull.Value),
new SqlParameter("@ZXXS",DBNull.Value),
new SqlParameter("@QLJ",DBNull.Value),
new SqlParameter("@HLJ",DBNull.Value),
new SqlParameter("@LTS",DBNull.Value),
new SqlParameter("@LTGG",DBNull.Value),
new SqlParameter("@GBTHPS",DBNull.Value),
new SqlParameter("@ZJ",DBNull.Value),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS",DBNull.Value),
new SqlParameter("@WKC","9550"),
new SqlParameter("@WKK","2500"),
new SqlParameter("@WKG","3230"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","19200"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","19070"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","2"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","75"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ",DBNull.Value),
new SqlParameter("@QYBZ","Q/JQ.J02.295-2003(2005)《SJX5191TSN12型固井水泥车》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                        质检科长:                     签发单位:  第四机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L13TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·6·科技峰会"),
new SqlParameter("@VERSION","6"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{6}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","115.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676792"),
new SqlParameter("@FPLX","专票")
                                                };


                        #endregion param5
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param5);
                        id++;
                        #region  param6
                        SqlParameter[] param6 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","QX"),
new SqlParameter("@ZCHGZBH","CAA0ZJ40507060"),
new SqlParameter("@WZHGZBH","CAA02ZJ40507060"),
new SqlParameter("@DPHGZBH",DBNull.Value),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","钻机车"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5821TZJ30"),
new SqlParameter("@CSYS","红色"),
new SqlParameter("@DPXH",DBNull.Value),
new SqlParameter("@DPID",DBNull.Value),
new SqlParameter("@CLSBDH","LA9E5VCH750SJZ060"),
new SqlParameter("@CJH",DBNull.Value),
new SqlParameter("@FDJH","CAT3406 6TB22827"),
new SqlParameter("@FDJXH","CAT3406"),
new SqlParameter("@RLZL","柴油/ /"),
new SqlParameter("@PFBZ","GB3847-1999,GB17691-2001 (第二阶段)"),
new SqlParameter("@PL","14600"),
new SqlParameter("@GL","343"),
new SqlParameter("@ZXXS","方向盘"),
new SqlParameter("@QLJ","2412"),
new SqlParameter("@HLJ","2325"),
new SqlParameter("@LTS","20"),
new SqlParameter("@LTGG","18.00-22.5/12.00-20"),
new SqlParameter("@GBTHPS","9+9+9/-+-+-"),
new SqlParameter("@ZJ","1300+1300+4790+1370+1370+1370"),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS","7"),
new SqlParameter("@WKC","22169"),
new SqlParameter("@WKK","3240"),
new SqlParameter("@WKG","4530"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","82125"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","82060"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","1"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","48"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ","该车为双发动机,其另一发动机号:CAT3406 6TB22947"),
new SqlParameter("@QYBZ","Q/JQ.J02.300-2000(2005)《SJX5821TZJ30型钻机车》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                   质检科长:                 签发单位:第四石油机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now.AddHours(-1)),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L17TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·10·科技峰会"),
new SqlParameter("@VERSION","10"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{10}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","119.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676796"),
new SqlParameter("@FPLX","专票")
                                                };


                        #endregion param6
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param6);
                        id++;
                        #region  param7
                        SqlParameter[] param7 = {

new SqlParameter("@H_ID","4943273806427_0000076381"+id.ToString()),
new SqlParameter("@QYID_BJ","HX175002"),
new SqlParameter("@CLZTXX","QX"),
new SqlParameter("@ZCHGZBH","CAA0ZJ30510111"),
new SqlParameter("@WZHGZBH","CAA02ZJ30510111"),
new SqlParameter("@DPHGZBH",DBNull.Value),
new SqlParameter("@FZRQ","2017/11/21 00:21:21"),
new SqlParameter("@CLZZQYMC","江汉石油管理局第四机械厂"),
new SqlParameter("@QYID","CAA0"),
new SqlParameter("@CLLX","专用汽车"),
new SqlParameter("@CLMC","钻机车"),
new SqlParameter("@CLPP","四机牌"),
new SqlParameter("@CLXH","SJX5560TZJ20"),
new SqlParameter("@CSYS","红色"),
new SqlParameter("@DPXH",DBNull.Value),
new SqlParameter("@DPID",DBNull.Value),
new SqlParameter("@CLSBDH","LA9E5VGF950SJX111"),
new SqlParameter("@CJH",DBNull.Value),
new SqlParameter("@FDJH","CAT3412 38S23685"),
new SqlParameter("@FDJXH","CAT3412"),
new SqlParameter("@RLZL","柴油/ /"),
new SqlParameter("@PFBZ","GB3847-1999,GB17691-2001 (第二阶段)"),
new SqlParameter("@PL","27000"),
new SqlParameter("@GL","485"),
new SqlParameter("@ZXXS","方向盘"),
new SqlParameter("@QLJ","2180"),
new SqlParameter("@HLJ","2180"),
new SqlParameter("@LTS","12"),
new SqlParameter("@LTGG","18.00-22.5"),
new SqlParameter("@GBTHPS","8+8//8-"),
new SqlParameter("@ZJ","1300+1300+4655+1370+1370"),
new SqlParameter("@ZH",DBNull.Value),
new SqlParameter("@ZS","6"),
new SqlParameter("@WKC","19800"),
new SqlParameter("@WKK","3100"),
new SqlParameter("@WKG","4470"),
new SqlParameter("@HXNBC",DBNull.Value),
new SqlParameter("@HXNBK",DBNull.Value),
new SqlParameter("@HXNBG",DBNull.Value),
new SqlParameter("@ZZL","56065"),
new SqlParameter("@EDZZL",DBNull.Value),
new SqlParameter("@ZBZL","5600"),
new SqlParameter("@ZZLLYXS",DBNull.Value),
new SqlParameter("@ZQYZZL",DBNull.Value),
new SqlParameter("@EDZK",DBNull.Value),
new SqlParameter("@BGCAZZDYXZZL",DBNull.Value),
new SqlParameter("@JSSZCRS","1"),
new SqlParameter("@QZDFS",DBNull.Value),
new SqlParameter("@HZDFS",DBNull.Value),
new SqlParameter("@QZDCZFS",DBNull.Value),
new SqlParameter("@HZDCZFS",DBNull.Value),
new SqlParameter("@ZGCS","48"),
new SqlParameter("@CLZZRQ",DateTime.Now.AddDays(-10)),
new SqlParameter("@BZ",DBNull.Value),
new SqlParameter("@QYBZ","Q/JQ.J02.234-2000 (2005)《SJX5560TZJ20型钻机车》"),
new SqlParameter("@CPSCDZ","湖北省荆州市荆州区西门龙山寺"),
new SqlParameter("@QYQTXX","检验员:                   质检科长:                 签发单位:第四石油机械厂质检科"),
new SqlParameter("@CZRQ",DateTime.Now.AddMonths(-1)),
new SqlParameter("@CREATETIME",DateTime.Now),
new SqlParameter("@UPDATETIME",DateTime.Now.AddHours(1)),
new SqlParameter("@HD_USER","HX175002U001"),
new SqlParameter("@CLSCDWMC",DBNull.Value),
new SqlParameter("@YH",DBNull.Value),
new SqlParameter("@ZXZS",DBNull.Value),
new SqlParameter("@CDDBJ",DBNull.Value),
new SqlParameter("@VERCODE",DBNull.Value),
new SqlParameter("@HD_HOST",DBNull.Value),
new SqlParameter("@RESPONSE_CODE",DBNull.Value),
new SqlParameter("@CLIENT_HARDWARE_INFO",DBNull.Value),
new SqlParameter("@APPLICMEMO"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTYPE"," ‘汽车产业需求’需修改;"),
new SqlParameter("@APPLICTIME","2017/11/21 00:21:22"),
new SqlParameter("@STATUS","43242"),
new SqlParameter("@APPROVETIME",DBNull.Value),
new SqlParameter("@APPROVEUSER",DBNull.Value),
new SqlParameter("@APPROVEMEMO",DBNull.Value),
new SqlParameter("@FIRSTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@LASTGETTIME","2017/11/21 00:21:21"),
new SqlParameter("@FEEDBACKTIME","2017/11/21 00:21:22"),
new SqlParameter("@FEEDBACKEMEMO","【测试数据】"),
new SqlParameter("@CPH",""),
new SqlParameter("@PC","LAPTOP-G28L16TBO"),
new SqlParameter("@GGSXRQ",""),
new SqlParameter("@UKEY","188-53DB-4D95-B7E6-F95&……%&*()*(·9·科技峰会"),
new SqlParameter("@VERSION","9"),
new SqlParameter("@ZZBH","ZZBHi"),
new SqlParameter("@DYWYM","调用汽车网页码"),
new SqlParameter("@PZXLH","S001"),
new SqlParameter("@LSPZXLH","临时牌照序列号"),
new SqlParameter("@IMPORTFLAG","{9}"),
new SqlParameter("@UPSEND_TAG","S001"),
new SqlParameter("@HSJE","118.1234"),
new SqlParameter("@TypeCode","/\\\"\""),
new SqlParameter("@InvNo","#$#6767-=21387||euri\"\"676795"),
new SqlParameter("@FPLX","专票")
                                                };


                        #endregion param7
                        sqlHelper.ExecuteNonQuery(connectionString, sql, param7);
                        id++;

                    }
                    catch(Exception ex)
                    {
                        IsStopped = false;
                        throw ex;
                    }
                }

            }
                           
        }

        //停止
        public void Stop()
        {
            IsStopped = false;
        }

        public static int P_Barcode_Upsert(int AnalyseId,
                                           DateTime TimeStamp,
                                           string Barcode,
                                           string ParserIOVersion,
                                           string InputCode,
                                           string SymbologyID,
                                           string SymbologyIDDesignation,
                                           string Type,
                                           string SubType,
                                           string NaSIdParamName,
                                           bool ContainsOrMayContainId,
                                           List<Identifier> Identifiers,
                                           string ACL,
                                           string ADDITIONALID,
                                           string BESTBEFORE,
                                           string CIP,
                                           string CONTENT,
                                           string COUNT,
                                           string CUSTPARTNO,
                                           string EAN13,
                                           string Expiry,
                                           string Family,
                                           string GTIN,
                                           string INTERNAL_90,
                                           string INTERNAL_91,
                                           string INTERNAL_92,
                                           string INTERNAL_93,
                                           string INTERNAL_94,
                                           string INTERNAL_95,
                                           string INTERNAL_96,
                                           string INTERNAL_97,
                                           string INTERNAL_98,
                                           string INTERNAL_99,
                                           string LIC,
                                           string Lot,
                                           string LPP,
                                           string NaS7,
                                           string NormalizedBESTBEFORE,
                                           string NormalizedExpiry,
                                           string NormalizedPRODDATE,
                                           string PCN,
                                           string PRODDATE,
                                           string Quantity,
                                           string Reference,
                                           string Serial,
                                           string SSCC,
                                           string StorageLocation,
                                           string UDI,
                                           string UDI_DI,
                                           string Issuer,
                                           string UoM,
                                           string UPN,
                                           string VARCOUNT,
                                           string VARIANT,
                                           string AdditionalInformation,
                                           string Commentary)
        {
            int executeResult = 0;
            string sqlCmdName = "P_Barcode_Upsert";
            List<SqlParameter> inParam = new List<SqlParameter>();

            SqlParameter AnalyseIdParam = new SqlParameter();
            AnalyseIdParam.ParameterName = "AnalyseId";
            AnalyseIdParam.Value = AnalyseId;
            inParam.Add(AnalyseIdParam);

            SqlParameter TimeStampParam = new SqlParameter();
            TimeStampParam.ParameterName = "TimeStamp";
            TimeStampParam.Value = TimeStamp;
            inParam.Add(TimeStampParam);

            SqlParameter ParserIOVersionParam = new SqlParameter();
            ParserIOVersionParam.ParameterName = "ParserIOVersion";
            ParserIOVersionParam.Value = ParserIOVersion;
            inParam.Add(ParserIOVersionParam);

            SqlParameter BarcodeParam = new SqlParameter();
            BarcodeParam.ParameterName = "Barcode";
            BarcodeParam.Value = Barcode;
            inParam.Add(BarcodeParam);

            SqlParameter InputCodeParam = new SqlParameter();
            InputCodeParam.ParameterName = "InputCode";
            InputCodeParam.Value = InputCode;
            inParam.Add(InputCodeParam);

            SqlParameter SymbologyIDParam = new SqlParameter();
            SymbologyIDParam.ParameterName = "SymbologyID";
            SymbologyIDParam.Value = SymbologyID;
            inParam.Add(SymbologyIDParam);

            SqlParameter SymbologyIDDesignationParam = new SqlParameter();
            SymbologyIDDesignationParam.ParameterName = "SymbologyIDDesignation";
            SymbologyIDDesignationParam.Value = SymbologyIDDesignation;
            inParam.Add(SymbologyIDDesignationParam);

            SqlParameter TypeParam = new SqlParameter();
            TypeParam.ParameterName = "Type";
            TypeParam.Value = Type;
            inParam.Add(TypeParam);

            SqlParameter SubTypeParam = new SqlParameter();
            SubTypeParam.ParameterName = "SubType";
            SubTypeParam.Value = SubType;
            inParam.Add(SubTypeParam);

            SqlParameter containsOrMayContainIdParam = new SqlParameter();
            containsOrMayContainIdParam.ParameterName = "ContainsOrMayContainId";
            containsOrMayContainIdParam.Value = ContainsOrMayContainId;
            inParam.Add(containsOrMayContainIdParam);


            //Identifiers
            string IdentifiersRawList = string.Empty;
            bool isFirst = true;
            string separator = string.Empty;
            foreach(Identifier x in Identifiers)
            {
                IdentifiersRawList = IdentifiersRawList + "@" + x.Value;
            }
            if(IdentifiersRawList.StartsWith("@"))
            {
                IdentifiersRawList = IdentifiersRawList.TrimStart('@');
            }


            SqlParameter identifiersParam = new SqlParameter();
            identifiersParam.ParameterName = "Identifiers";
            identifiersParam.Value = IdentifiersRawList;
            inParam.Add(identifiersParam);



            SqlParameter ACLParam = new SqlParameter();
            ACLParam.ParameterName = "ACL";
            ACLParam.Value = ACL;
            inParam.Add(ACLParam);

            SqlParameter NaSIdParamNameParam = new SqlParameter();
            NaSIdParamNameParam.ParameterName = "NaSIdParamName";
            NaSIdParamNameParam.Value = NaSIdParamName;
            inParam.Add(NaSIdParamNameParam);

            SqlParameter ADDITIONALIDParam = new SqlParameter();
            ADDITIONALIDParam.ParameterName = "ADDITIONALID";
            ADDITIONALIDParam.Value = ADDITIONALID;
            inParam.Add(ADDITIONALIDParam);

            SqlParameter BESTBEFOREParam = new SqlParameter();
            BESTBEFOREParam.ParameterName = "BESTBEFORE";
            BESTBEFOREParam.Value = BESTBEFORE;
            inParam.Add(BESTBEFOREParam);

            SqlParameter CIPParam = new SqlParameter();
            CIPParam.ParameterName = "CIP";
            CIPParam.Value = CIP;
            inParam.Add(CIPParam);

            SqlParameter CONTENTParam = new SqlParameter();
            CONTENTParam.ParameterName = "CONTENT";
            CONTENTParam.Value = CONTENT;
            inParam.Add(CONTENTParam);

            SqlParameter COUNTParam = new SqlParameter();
            COUNTParam.ParameterName = "COUNT";
            COUNTParam.Value = COUNT;
            inParam.Add(COUNTParam);

            SqlParameter CUSTPARTNOParam = new SqlParameter();
            CUSTPARTNOParam.ParameterName = "CUSTPARTNO";
            CUSTPARTNOParam.Value = CUSTPARTNO;
            inParam.Add(CUSTPARTNOParam);

            SqlParameter EANParam = new SqlParameter();
            EANParam.ParameterName = "EAN";
            EANParam.Value = EAN13;
            inParam.Add(EANParam);

            SqlParameter ExpiryParam = new SqlParameter();
            ExpiryParam.ParameterName = "Expiry";
            ExpiryParam.Value = Expiry;
            inParam.Add(ExpiryParam);

            SqlParameter FamilyParam = new SqlParameter();
            FamilyParam.ParameterName = "Family";
            FamilyParam.Value = Family;
            inParam.Add(FamilyParam);

            SqlParameter GTINParam = new SqlParameter();
            GTINParam.ParameterName = "GTIN";
            GTINParam.Value = GTIN;
            inParam.Add(GTINParam);

            SqlParameter INTERNAL_90Param = new SqlParameter();
            INTERNAL_90Param.ParameterName = "INTERNAL_90";
            INTERNAL_90Param.Value = INTERNAL_90;
            inParam.Add(INTERNAL_90Param);

            SqlParameter INTERNAL_91Param = new SqlParameter();
            INTERNAL_91Param.ParameterName = "INTERNAL_91";
            INTERNAL_91Param.Value = INTERNAL_91;
            inParam.Add(INTERNAL_91Param);

            SqlParameter INTERNAL_92Param = new SqlParameter();
            INTERNAL_92Param.ParameterName = "INTERNAL_92";
            INTERNAL_92Param.Value = INTERNAL_92;
            inParam.Add(INTERNAL_92Param);

            SqlParameter INTERNAL_93Param = new SqlParameter();
            INTERNAL_93Param.ParameterName = "INTERNAL_93";
            INTERNAL_93Param.Value = INTERNAL_93;
            inParam.Add(INTERNAL_93Param);

            SqlParameter INTERNAL_94Param = new SqlParameter();
            INTERNAL_94Param.ParameterName = "INTERNAL_94";
            INTERNAL_94Param.Value = INTERNAL_94;
            inParam.Add(INTERNAL_94Param);

            SqlParameter INTERNAL_95Param = new SqlParameter();
            INTERNAL_95Param.ParameterName = "INTERNAL_95";
            INTERNAL_95Param.Value = INTERNAL_95;
            inParam.Add(INTERNAL_95Param);

            SqlParameter INTERNAL_96Param = new SqlParameter();
            INTERNAL_96Param.ParameterName = "INTERNAL_96";
            INTERNAL_96Param.Value = INTERNAL_96;
            inParam.Add(INTERNAL_96Param);

            SqlParameter INTERNAL_97Param = new SqlParameter();
            INTERNAL_97Param.ParameterName = "INTERNAL_97";
            INTERNAL_97Param.Value = INTERNAL_97;
            inParam.Add(INTERNAL_97Param);

            SqlParameter INTERNAL_98Param = new SqlParameter();
            INTERNAL_98Param.ParameterName = "INTERNAL_98";
            INTERNAL_98Param.Value = INTERNAL_98;
            inParam.Add(INTERNAL_98Param);

            SqlParameter INTERNAL_99Param = new SqlParameter();
            INTERNAL_99Param.ParameterName = "INTERNAL_99";
            INTERNAL_99Param.Value = INTERNAL_99;
            inParam.Add(INTERNAL_99Param);

            SqlParameter LICParam = new SqlParameter();
            LICParam.ParameterName = "LIC";
            LICParam.Value = LIC;
            inParam.Add(LICParam);

            SqlParameter LotParam = new SqlParameter();
            LotParam.ParameterName = "Lot";
            LotParam.Value = Lot;
            inParam.Add(LotParam);

            SqlParameter LPPParam = new SqlParameter();
            LPPParam.ParameterName = "LPP";
            LPPParam.Value = LPP;
            inParam.Add(LPPParam);

            SqlParameter NaS7Param = new SqlParameter();
            NaS7Param.ParameterName = "NaS7";
            NaS7Param.Value = NaS7;
            inParam.Add(NaS7Param);

            SqlParameter NormalizedBESTBEFOREParam = new SqlParameter();
            NormalizedBESTBEFOREParam.ParameterName = "NormalizedBESTBEFORE";
            NormalizedBESTBEFOREParam.Value = NormalizedBESTBEFORE;
            inParam.Add(NormalizedBESTBEFOREParam);

            SqlParameter NormalizedExpiryParam = new SqlParameter();
            NormalizedExpiryParam.ParameterName = "NormalizedExpiry";
            NormalizedExpiryParam.Value = NormalizedExpiry;
            inParam.Add(NormalizedExpiryParam);

            SqlParameter NormalizedPRODDATEParam = new SqlParameter();
            NormalizedPRODDATEParam.ParameterName = "NormalizedPRODDATE";
            NormalizedPRODDATEParam.Value = NormalizedPRODDATE;
            inParam.Add(NormalizedPRODDATEParam);

            SqlParameter PCNParam = new SqlParameter();
            PCNParam.ParameterName = "PCN";
            PCNParam.Value = PCN;
            inParam.Add(PCNParam);

            SqlParameter PRODDATEParam = new SqlParameter();
            PRODDATEParam.ParameterName = "PRODDATE";
            PRODDATEParam.Value = PRODDATE;
            inParam.Add(PRODDATEParam);

            SqlParameter QuantityParam = new SqlParameter();
            QuantityParam.ParameterName = "Quantity";
            QuantityParam.Value = Quantity;
            inParam.Add(QuantityParam);

            SqlParameter ReferenceParam = new SqlParameter();
            ReferenceParam.ParameterName = "Reference";
            ReferenceParam.Value = Reference;
            inParam.Add(ReferenceParam);

            SqlParameter SerialParam = new SqlParameter();
            SerialParam.ParameterName = "Serial";
            SerialParam.Value = Serial;
            inParam.Add(SerialParam);

            SqlParameter SSCCParam = new SqlParameter();
            SSCCParam.ParameterName = "SSCC";
            SSCCParam.Value = SSCC;
            inParam.Add(SSCCParam);

            SqlParameter StorageLocationParam = new SqlParameter();
            StorageLocationParam.ParameterName = "StorageLocation";
            StorageLocationParam.Value = StorageLocation;
            inParam.Add(StorageLocationParam);

            SqlParameter UDIParam = new SqlParameter();
            UDIParam.ParameterName = "UDI";
            UDIParam.Value = UDI;
            inParam.Add(UDIParam);

            SqlParameter UDI_DIParam = new SqlParameter();
            UDI_DIParam.ParameterName = "UDI_DI";
            UDI_DIParam.Value = UDI_DI;
            inParam.Add(UDI_DIParam);

            SqlParameter IssuerParam = new SqlParameter();
            IssuerParam.ParameterName = "Issuer";
            IssuerParam.Value = Issuer;
            inParam.Add(IssuerParam);

            SqlParameter UoMParam = new SqlParameter();
            UoMParam.ParameterName = "UoM";
            UoMParam.Value = UoM;
            inParam.Add(UoMParam);

            SqlParameter UPNParam = new SqlParameter();
            UPNParam.ParameterName = "UPN";
            UPNParam.Value = UPN;
            inParam.Add(UPNParam);

            SqlParameter VARCOUNTParam = new SqlParameter();
            VARCOUNTParam.ParameterName = "VARCOUNT";
            VARCOUNTParam.Value = VARCOUNT;
            inParam.Add(VARCOUNTParam);

            SqlParameter VARIANTParam = new SqlParameter();
            VARIANTParam.ParameterName = "VARIANT";
            VARIANTParam.Value = VARIANT;
            inParam.Add(VARIANTParam);

            SqlParameter AdditionalInformationParam = new SqlParameter();
            AdditionalInformationParam.ParameterName = "AdditionalInformation";
            AdditionalInformationParam.Value = AdditionalInformation;
            inParam.Add(AdditionalInformationParam);

            SqlParameter CommentaryParam = new SqlParameter();
            CommentaryParam.ParameterName = "Commentary";
            CommentaryParam.Value = Commentary;
            inParam.Add(CommentaryParam);

            DataBaseHelper dbHelper = new DataBaseHelper();
            dbHelper.ExecuteScalarStoredProcedure(sqlCmdName, inParam);
            return executeResult;
        }

        public static DataSet P_Barcode_List()
        {
            string spName = "P_Barcode_List";
            DataBaseHelper dbHelper = new DataBaseHelper();
            DataSet result = new DataSet();
            result = dbHelper.ExecuteStoredProcedure(spName);
            return result;
        }


        #endregion
        #region "Insert Employee data"
        public int AddEmployee()
        {
            try
            {
                DR = obj_cDataAccess.RunSPReturnDR("USP_I_AddEmployee"

                 , new SqlParameter("@SequenceNumber", SequenceNumber)
                 , new SqlParameter("@Descriptions", Descriptions)
                 , new SqlParameter("@Designation", Designation)
                 , new SqlParameter("@Country", Country)
                 , new SqlParameter("@DateOfJoin", DateOfJoin)
                 , new SqlParameter("@EmployeeCode", EmployeeCode)
                 , new SqlParameter("@Email", Email)
                 , new SqlParameter("@Name", Name)
                 , new SqlParameter("@FatherName", FatherName)
                 , new SqlParameter("@Address", Address)
                 , new SqlParameter("@DateOfBirth", DateOfBirth)
                 , new SqlParameter("@Gender", Gender)
                 , new SqlParameter("@State", State)
                 , new SqlParameter("@City", City)
                 , new SqlParameter("@IsActive", IsActive)
                 , new SqlParameter("@UploadImages", UploadImages)
                 , new SqlParameter("@Mobile", Mobile)
                 , new SqlParameter("@UserName", UserName)
                 , new SqlParameter("@Password", Password)
                 , new SqlParameter("@Status", Status)
                 , new SqlParameter("@EmployeeType", EmployeeType)
                 , new SqlParameter("@MentorsOne", MentorsOne)
                 , new SqlParameter("@MentorsTwo", MentorsTwo)
                 , new SqlParameter("@MentorsThree", MentorsThree)
                 , new SqlParameter("@MentorsFour", MentorsFour)
                 , new SqlParameter("@WorkLocation", WorkLocation)
                 , new SqlParameter("@Qualification", Qualification)
                 , new SqlParameter("@Experience", Experience)
                 , new SqlParameter("@OtherDuties", OtherDuties)
                 , new SqlParameter("@Interest", Interest)
                 );
                while (DR.Read())
                {
                    RecordStatus = Convert.ToInt32(DR[0]);
                }
            }
            catch (Exception)
            {

            }
            return RecordStatus;

        }

        #endregion




        #region "Fill EMPLOYEE WORK"
        public DataSet DisplayEmployeeWork()
        {
            try
            {
                DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_FillMasterDetails"
                    , new SqlParameter("@CALL_TYPE", "EMPLOYEE_WORK")
                 );
                return DS;
            }
            catch (Exception ex)
            {
                return DS;
            }
        }
        #endregion 
        
        #region "Fill EMPLOYEE SYLLBUS"
        public DataSet DisplayEmployeeSyllbus()
        {
            try
            {
                DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_FillMasterDetails"
                    , new SqlParameter("@CALL_TYPE", "EMPLOYEE_SYLLBUS")
                 );
                return DS;
            }
            catch (Exception ex)
            {
                return DS;
            }
        }
        #endregion 

        #region "Fill Employee grid View BY CallType...."
        public DataSet DisplayEmployee1()
        {
            try
            {
                DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_FillMasterDetails"
                    , new SqlParameter("@CALL_TYPE", "EMPLOYEE1")
                 );
                return DS;
            }
            catch (Exception ex)
            {
                return DS;
            }
        }
        #endregion "End Fill User Grid view ..."
        #region "Fill Employee grid View BY CallType...."
        public DataSet DisplayEmployee()
        {
            try
            {
                DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_FillMasterDetails"
                    , new SqlParameter("@CALL_TYPE", "EMPLOYEE")
                 );
                return DS;
            }
            catch (Exception ex)
            {
                return DS;
            }
        }
        #endregion "End Fill User Grid view ..."

        #region "Fill Employee grid View BY CallType...."
        public DataSet DisplayPEmployee()
        {
            try
            {
                DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_FillMasterDetails"
                    , new SqlParameter("@CALL_TYPE", "PEMPLOYEE")
                    , new SqlParameter("@EmployeeId", EmployeeId)
                 );
                return DS;
            }
            catch (Exception ex)
            {
                return DS;
            }
        }

        #region ==Invoice==

        [OperationContract]
        [FaultContract(typeof(DataService))]
        List<InvoiceDetailsService> GetInvoiceDetails(int FromInvoiceNo, int ToInvoiceNo, DateTime FromInvoiceDate, DateTime ToInvoiceDate, string OrderID);

        [OperationContract]
        [FaultContract(typeof(DataService))]
        bool UpdateInvoiceDetails(InvoiceDetailsService invoiceDetails, Customer customerDetails, int UserID);

        [OperationContract]
        [FaultContract(typeof(DataService))]
        bool UpdateInvoiceProduct(ProductDetails productDetails, int UserID);

        [OperationContract]
        [FaultContract(typeof(DataService))]
        bool UpdateInvoiceSettlement(SettlementDetails settlementDetails, int UserID);

        [OperationContract]
        [FaultContract(typeof(DataService))]
        bool DeleteInvoiceDetails(InvoiceDetailsService invoiceDetails, int UserID);

        [OperationContract]
        [FaultContract(typeof(DataService))]
        bool DeleteInvoiceProduct(ProductDetails productDetails, int UserID);

     
        #endregion

        #region "Search Itse Result"
        public DataSet SearchItseResult()
        {
            DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_Result",
                   new SqlParameter("@RollNo", RollNumber)
                        , new SqlParameter("@Year", Year)
                   , new SqlParameter("CallType", "ItseResult")
            );
            return DS;
        }
        #endregion

        #region "Search Scholer Result"
        public DataSet SearchScholerResult()
        {
            DS = obj_cDataAccess.RunSPReturnDataSet("USP_I_Result",
                  new SqlParameter("@RollNo", RollNumber)
                  , new SqlParameter("@ScholerTestResultId", ScholerTestResultId)
                  , new SqlParameter("CallType", "ScholerShipResult")
           );
            return DS;
        }
        #endregion

        #region"Add ScholerTestSheet Test"
        public int AddScholerTestSheet()
        {
            try
            {
                int ProductID = 0;
                DS = obj_cDataAccess.RunSPReturnDataSet("IdeaMasterInsert"
                   , new SqlParameter("@ScholerTestSheetId", ScholerTestSheetId)
                   , new SqlParameter("@ScholerTestResultId", ScholerTestResultId)
                   , new SqlParameter("@RollNumber", RollNumber)
                   , new SqlParameter("@Name", Name)
                   , new SqlParameter("@School", School)
                   , new SqlParameter("@FatherName", FatherName)
                   , new SqlParameter("@MobileNo", MobileNo)
                   , new SqlParameter("@MaxMark", MaxMark)
                   , new SqlParameter("@ObtainMark", ObtainMark)
                   , new SqlParameter("@PercentageMark", PercentageMark)
                   , new SqlParameter("@Rank", Rank)
                   , new SqlParameter("@ScholoarShip", ScholoarShip)
                   , new SqlParameter("@CallType", "ADD_ScholerTestSheet")

                );
                if (DS.Tables[0].Rows.Count > 0)
                {
                    return ProductID = Convert.ToInt32(DS.Tables[0].Rows[0][0].ToString());
                }
                else
                {
                    return ProductID;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion


        #region"Add ITSE Test"
        public int AddITSETest()
        {
            try
            {
                int ProductID = 0;
                DS = obj_cDataAccess.RunSPReturnDataSet("IdeaMasterInsert"
                   , new SqlParameter("@ItseResultId", ItseResultId)
                   , new SqlParameter("@RollNumber", RollNumber)
                   , new SqlParameter("@Name", Name)
                   , new SqlParameter("@School", School)
                   , new SqlParameter("@FatherName", FatherName)
                   , new SqlParameter("@MobileNo", MobileNo)
                   , new SqlParameter("@MaxMark", MaxMark)
                   , new SqlParameter("@ObtainMark", ObtainMark)
                   , new SqlParameter("@PercentageMark", PercentageMark)
                   , new SqlParameter("@Rank", Rank)
                   , new SqlParameter("@ScholoarShip", ScholoarShip)
                   , new SqlParameter("@year", year)
                   , new SqlParameter("@class",Class)
                   , new SqlParameter("@Additional_ScholoarShip", Additional_ScholoarShip )
                   , new SqlParameter("@Total_ScholoarShip", Total_ScholoarShip)

                   , new SqlParameter("@CallType", "ADD_ISET")
                );
                if (DS.Tables[0].Rows.Count > 0)
                {
                    return ProductID = Convert.ToInt32(DS.Tables[0].Rows[0][0].ToString());
                }
                else
                {
                    return ProductID;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion

        #region"Add RegularSheet Test"
        public int AddRegularSheet()
        {
            try
            {
                int ProductID = 0;
                DS = obj_cDataAccess.RunSPReturnDataSet("IdeaMasterInsert"
                   , new SqlParameter("@RegularTestSheetId", RegularTestSheetId)
                   , new SqlParameter("@RegularTestId", RegularTestId)
                   , new SqlParameter("@Name", Name)
                   , new SqlParameter("@RegNo", RegNo)
                   , new SqlParameter("@MaxMark", MaxMark)
                   , new SqlParameter("@ObtainMark", ObtainMark)
                   , new SqlParameter("@Percentage", Percentage)
                   , new SqlParameter("@Rank", Rank)
                   , new SqlParameter("@CallType", "ADD_RegularSheet")
                );
                if (DS.Tables[0].Rows.Count > 0)
                {
                    return ProductID = Convert.ToInt32(DS.Tables[0].Rows[0][0].ToString());
                }
                else
                {
                    return ProductID;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
        #endregion

        #region"Add DristhiTestSheet Test"
        public int AddDristhiTestSheet()
        {
            try
            {
                int ProductID = 0;
                DS = obj_cDataAccess.RunSPReturnDataSet("IdeaMasterInsert"
                   , new SqlParameter("@DristhiTestSheetId", DristhiTestSheetId)
                   , new SqlParameter("@DristhiTestResultId", DristhiTestResultId)
                   , new SqlParameter("@Name", Name)
                   , new SqlParameter("@RegNo", RegNo)
                   , new SqlParameter("@MmPhy", MmPhy)
                   , new SqlParameter("@MmChe", MmChe)
                   , new SqlParameter("@MmMath", MmMath)
                   , new SqlParameter("@MmBio", MmBio)
                   , new SqlParameter("@MmGk", MmGk)
                   , new SqlParameter("@MmEng", MmEng)
                   , new SqlParameter("@MmScience", MmScience)
                   , new SqlParameter("@MoPhy", MoPhy)
                   , new SqlParameter("@MoChe", MoChe)
                   , new SqlParameter("@MoMath", MoMath)
                   , new SqlParameter("@MoBio", MoBio)
                   , new SqlParameter("@MoGk", MoGk)
                   , new SqlParameter("@MoEng", MoEng)
                   , new SqlParameter("@MoScience", MoScience)
                   , new SqlParameter("@TotalMaxMarks", TotalMaxMarks)
                   , new SqlParameter("@TotalMarks", TotalMarks)
                   , new SqlParameter("@CutOfMarks", CutOfMarks)
                   , new SqlParameter("@Percentage", Percentage)
                   , new SqlParameter("@AIRRank", AIRRank)
                   , new SqlParameter("@TotolMarksOfTopper", TotolMarksOfTopper)
                   , new SqlParameter("@CallType", "ADD_DristhiTestSheet")
                );
                if (DS.Tables[0].Rows.Count > 0)
                {
                    return ProductID = Convert.ToInt32(DS.Tables[0].Rows[0][0].ToString());
                }
                else
                {
                    return ProductID;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }

Microsoft.Data.SqlClient.SqlParameter : IDbDataParameter, IDataParameter, ICloneable

Constructors :

public SqlParameter()
public SqlParameter(String parameterName = , SqlDbType dbType = )
public SqlParameter(String parameterName = , SqlDbType dbType = , Int32 size = )
public SqlParameter(String parameterName = , SqlDbType dbType = , Int32 size = , ParameterDirection direction = , Boolean isNullable = , Byte precision = , Byte scale = , String sourceColumn = , DataRowVersion sourceVersion = , Object value = )
public SqlParameter(String parameterName = , SqlDbType dbType = , Int32 size = , ParameterDirection direction = , Byte precision = , Byte scale = , String sourceColumn = , DataRowVersion sourceVersion = , Boolean sourceColumnNullMapping = , Object value = , String xmlSchemaCollectionDatabase = , String xmlSchemaCollectionOwningSchema = , String xmlSchemaCollectionName = )
public SqlParameter(String parameterName = , SqlDbType dbType = , Int32 size = , String sourceColumn = )
public SqlParameter(String parameterName = , Object value = )

Methods :

public SqlCompareOptions get_CompareInfo()
public Void set_CompareInfo(SqlCompareOptions value = )
public DbType get_DbType()
public Void set_DbType(DbType value = )
public ParameterDirection get_Direction()
public Void set_Direction(ParameterDirection value = )
public Boolean get_ForceColumnEncryption()
public Void set_ForceColumnEncryption(Boolean value = )
public Boolean get_IsNullable()
public Void set_IsNullable(Boolean value = )
public Int32 get_LocaleId()
public Void set_LocaleId(Int32 value = )
public Int32 get_Offset()
public Void set_Offset(Int32 value = )
public String get_ParameterName()
public Void set_ParameterName(String value = )
public Byte get_Precision()
public Void set_Precision(Byte value = )
public Byte get_Scale()
public Void set_Scale(Byte value = )
public Int32 get_Size()
public Void set_Size(Int32 value = )
public String get_SourceColumn()
public Void set_SourceColumn(String value = )
public Boolean get_SourceColumnNullMapping()
public Void set_SourceColumnNullMapping(Boolean value = )
public DataRowVersion get_SourceVersion()
public Void set_SourceVersion(DataRowVersion value = )
public SqlDbType get_SqlDbType()
public Void set_SqlDbType(SqlDbType value = )
public Object get_SqlValue()
public Void set_SqlValue(Object value = )
public String get_TypeName()
public Void set_TypeName(String value = )
public String get_UdtTypeName()
public Void set_UdtTypeName(String value = )
public Object get_Value()
public Void set_Value(Object value = )
public String get_XmlSchemaCollectionDatabase()
public Void set_XmlSchemaCollectionDatabase(String value = )
public String get_XmlSchemaCollectionName()
public Void set_XmlSchemaCollectionName(String value = )
public String get_XmlSchemaCollectionOwningSchema()
public Void set_XmlSchemaCollectionOwningSchema(String value = )
public Void ResetDbType()
public Void ResetSqlDbType()
public String ToString()
public Byte get_Precision()
public Void set_Precision(Byte value = )
public Byte get_Scale()
public Void set_Scale(Byte value = )
public Object GetLifetimeService()
public Object InitializeLifetimeService()
public Type GetType()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()