private void btnOk_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (dtExcelData == null) { return; } if (CheckColumns() == false) { return; } string sVendorName = ""; string sVAddress = ""; string sContactNo = ""; string sEmail = ""; string sCSTNo = ""; string sTNGSTNo = ""; string sTIN = ""; string sPAN = ""; int iSupply = 0; int iContract = 0; int iService = 0; for (int i = 0; i < dtExcelData.Rows.Count; i++) { sVendorName = dtExcelData.Rows[i]["VendorName"].ToString(); if (VendorBL.IsValidName(sVendorName) == true && sVendorName != "") { sVAddress = dtExcelData.Rows[i]["Address"].ToString(); sContactNo = dtExcelData.Rows[i]["ContactNo"].ToString(); sEmail = dtExcelData.Rows[i]["EmailId"].ToString(); sCSTNo = dtExcelData.Rows[i]["CSTNo"].ToString(); sTNGSTNo = dtExcelData.Rows[i]["TNGST"].ToString(); sTIN = dtExcelData.Rows[i]["TIN"].ToString(); sPAN = dtExcelData.Rows[i]["PAN"].ToString(); iSupply = Convert.ToInt32(clsStatic.IsNullCheck(dtExcelData.Rows[i]["Supply"].ToString(), clsStatic.datatypes.vartypenumeric)); iContract = Convert.ToInt32(clsStatic.IsNullCheck(dtExcelData.Rows[i]["Contract"].ToString(), clsStatic.datatypes.vartypenumeric)); iService = Convert.ToInt32(clsStatic.IsNullCheck(dtExcelData.Rows[i]["Service"].ToString(), clsStatic.datatypes.vartypenumeric)); VendorBL.ImportTransaction(sVendorName, sVAddress, sContactNo, sEmail, sCSTNo, sTNGSTNo, sTIN, sPAN, iSupply, iContract, iService); } } if (BsfGlobal.g_bFADB == true) { BsfGlobal.RefreshSubLedger(1); } MessageBox.Show("Imported Successfully!", "Vendor", MessageBoxButtons.OK, MessageBoxIcon.Information); Clear(); }