public DataTable LoadUserTableForAllData() { DataTable dt_User; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',U.UserId,U.Name,U.LoginName,U.Password,U.Active,U.ModifiedBy,U.ModifiedDate FROM tbl_User U where U.Active = 'true' order by U.Name"; dt_User = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_User); }
public DataTable LoadProductInStoreTableForAllDataByCatagoryIdAndProductCode(int int_Catagory_Id, String product_Code) { DataTable dt_ProductInStore; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',inS.Product_Id,p.Product_Code,p.Product_Description,inS.NoOfUnits as 'Total No Of Units In Store',(inS.NoOfUnits/p.NoOfUnitsPerCarton) as 'No Of Cartons in Store' , (inS.NoOfUnits%p.NoOfUnitsPerCarton) as 'No Of Units in Store',p.NoOfUnitsPerCarton, p.MinLVL, p.ReorderCtn from tbl_ProductInStore inS left join tbl_Product p on inS.Product_Id = p.Product_Id where (p.Catagory_Id ='" + int_Catagory_Id + "' OR '" + int_Catagory_Id + "'='0' ) And (p.Product_Code LIKE '%" + product_Code + "%' OR '" + product_Code + "'='') order by p.SrNo"; dt_ProductInStore = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_ProductInStore); }
public DataTable LoadPermissionTableForAllData() { DataTable dt_Permission; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT PermissionId,Description FROM tbl_Permission"; dt_Permission = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_Permission); }
public DataTable LoadProductInStoreTableByProductId(DEProductInStore productInStore) { DataTable dt_ProductInStore; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT NoOfUnits From tbl_ProductInStore where Product_Id = @Product_Id"; sqlCmd = DeclareSqlCmdParameter(sqlCmd, productInStore); dt_ProductInStore = SqlConjunction.GetSQLDataTable(sqlCmd); return(dt_ProductInStore); }
public DataTable LoadCatagoryTableForAllData() { DataTable dt_Catagory; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',Cat.Catagory_Id,Cat.Catagory_Description,Cat.Active,Cat.ModifiedBy,Cat.ModifiedDate FROM tbl_CustomerCatagory Cat where Cat.Active = 'true' order by Cat.Catagory_Description"; dt_Catagory = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_Catagory); }
public DataTable LoadProductTableForAllData() { DataTable dt_Product; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',Pro.Product_Id,Pro.Product_Code,Pro.Product_Description,Pro.Unit_Weight,Pro.NoOfUnitsPerCarton,Pro.Unit_Price,Pro.Carton_Price,Pro.CartonPrice_Buying,Pro.Catagory_Id,Cat.Catagory_Description,Pro.Active,Pro.ModifiedBy,Pro.ModifiedDate, Pro.Unit_Price2, Pro.Carton_Price2, Pro.MinLVL, Pro.ReorderCtn, Pro.SrNo FROM tbl_Product Pro LEFT JOIN tbl_Catagory Cat on Pro.Catagory_Id = Cat.Catagory_Id where Pro.Active = 'true' order by Pro.Product_Code"; dt_Product = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_Product); }
public Boolean LoadProductRow(DEProduct product) { Boolean bool_HasRows = false; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT Pro.Product_Id,Pro.Product_Code,Pro.Product_Description,Pro.Unit_Weight,Pro.NoOfUnitsPerCarton,Pro.Unit_Price,Pro.Carton_Price,Pro.CartonPrice_Buying,Pro.Catagory_Id,Cat.Catagory_Description,Pro.Active,Pro.ModifiedBy,Pro.ModifiedDate, Pro.Unit_Price2, Pro.Carton_Price2, Pro.MinLVL, Pro.ReorderCtn, Pro.SrNo FROM tbl_Product Pro LEFT JOIN tbl_Catagory Cat on Pro.Catagory_Id = Cat.Catagory_Id where Pro.Active = 'true' And Pro.Product_Id = @Product_Id"; sqlCmd = DeclareSqlCmdParameter(sqlCmd, product); SqlConnection con = new SqlConnection(SqlConjunction.DataConn); SqlDataReader sqlDataReader = SqlConjunction.GetSQLExecuteReader(sqlCmd, con); while (sqlDataReader.Read()) { product.Product_Id = sqlDataReader.GetInt32(0); product.Product_Code = sqlDataReader.GetString(1); product.Product_Description = sqlDataReader.GetString(2); product.Unit_Weight = sqlDataReader.GetDecimal(3); product.NoOfUnitsPerCarton = sqlDataReader.GetInt32(4); product.Unit_Price = sqlDataReader.GetDecimal(5); product.Carton_Price = sqlDataReader.GetDecimal(6); product.CartonPrice_Buying = sqlDataReader.GetDecimal(7); product.Catagory_Id = sqlDataReader.GetInt32(8); product.Catagory_Description = sqlDataReader.GetString(9); product.Active = sqlDataReader.GetBoolean(10); product.ModifiedBy = sqlDataReader.GetString(11); product.ModifiedDate = sqlDataReader.GetDateTime(12); product.Unit_Price2 = sqlDataReader.GetDecimal(13); product.Carton_Price2 = sqlDataReader.GetDecimal(14); product.MinLVL = sqlDataReader.GetInt32(15); product.ReorderCtn = sqlDataReader.GetInt32(16); product.SrNo = sqlDataReader.GetInt32(17); } if (sqlDataReader.HasRows) { bool_HasRows = true; } else { bool_HasRows = false; } con.Close(); sqlCmd = null; return(bool_HasRows); }
public DataTable LoadNoOfUnitsOfProductStockIn(DEStockIn stockIn, SqlConnection con, SqlTransaction tn) { DataTable dt_StockIn; SqlCommand sqlCmd = new SqlCommand(" ", con, tn); sqlCmd.CommandText = "SELECT ((st.NoOfCartons * p.NoOfUnitsPerCarton)+st.NoOfUnits),p.NoOfUnitsPerCarton From tbl_StockIn st LEFT JOIN tbl_Product p ON st.Product_Id = p.Product_Id where st.StockInId = @StockInId"; sqlCmd = DeclareSqlCmdParameter(sqlCmd, stockIn); dt_StockIn = SqlConjunction.GetSQLTransDataTable(sqlCmd); return(dt_StockIn); }
public DataTable LoadCustomerTableForAllData() { DataTable dt_Customer; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',Cus.Customer_Id,Cus.Customer_Description,Cus.Address,Cus.Phone, Cus.Catagory_Id,Cat.Catagory_Description,Cus.Active,Cus.ModifiedBy,Cus.ModifiedDate FROM tbl_Customer Cus LEFT JOIN tbl_CustomerCatagory Cat on Cus.Catagory_Id = Cat.Catagory_Id where Cus.Active = 'true' order by Cus.Customer_Description"; dt_Customer = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_Customer); }
public DataTable LoadStockTableForAllDataByInDateAndProductCode(DateTime dateTime_From, DateTime dateTime_To, String product_Code) { DataTable dt_StockIn; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',StIn.StockInId,StIn.StockInDate,StIn.Product_Id,P.Product_Code,P.Product_Description,StIn.NoOfCartons,StIn.NoOfUnits FROM tbl_StockIn StIn LEFT JOIN tbl_Product P ON StIn.Product_Id = P.Product_Id where StIn.StockInDate <='" + dateTime_To + "' And StIn.StockInDate >= '" + dateTime_From + "' And (P.Product_Code LIKE '%"+ product_Code + "%' OR '" + product_Code + "'='')"; dt_StockIn = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_StockIn); }
public DataTable LoadProductSaleSummaryTableForAllDataByInvoiceDate(DateTime dateTime_From, DateTime dateTime_To, int Category_Id) { DataTable dt_InvoiceDetail; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT Product_Code, Product_Description ,(Sum(CASE WHEN isCarton = 'True' then (Qty) ELSE (0) END)+ (Sum(CASE WHEN isCarton = 'False' then (Qty) ELSE (0) END)/NoOfUnitsPerCarton )) as 'Cartons',(Sum(CASE WHEN isCarton = 'False' then (Qty) ELSE (0) END))%NoOfUnitsPerCarton as 'Units' ,NoOfUnitsPerCarton,Sum(Amount) as 'Sale_Amount' from [dbo].[fn_GetProductSaleByReport]('" + dateTime_From + "','" + dateTime_To + "','" + Category_Id + "') group by Product_Code,Product_Description,NoOfUnitsPerCarton order by Product_Code;"; dt_InvoiceDetail = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_InvoiceDetail); }
public DataTable LoadInvoiceDetailTableForPromotionReport(DateTime dateTime_From, DateTime dateTime_To, int customerId, int categoryId) { DataTable dt_InvoiceDetail; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',invD.InvoiceDetail_Id,invD.Invoice_Id,invD.Product_Id,P.Product_Code,P.Product_Description,CASE WHEN invD.isCarton = 'true' THEN invD.Qty ELSE 0 END AS 'Cartons', CASE WHEN invD.isCarton = 'false' THEN invD.Qty ELSE 0 END AS 'Units', invD.Price, (invD.Qty * invD.Price) AS 'Amount', inv.PromDesc, invD.Active,invT.InvoiceType_Id,invT.InvoiceType_Description,Cus.Customer_Id,Cus.Customer_Description,inv.Invoice_No,inv.Invoice_Date FROM tbl_InvoiceDetail invD LEFT JOIN tbl_Product P ON invD.Product_Id = P.Product_Id LEFT JOIN tbl_Invoice inv ON invD.Invoice_Id = inv.Invoice_Id LEFT JOIN tbl_Customer Cus ON inv.Customer_Id = Cus.Customer_Id LEFT JOIN tbl_InvoiceType invT ON inv.InvoiceType_Id = invT.InvoiceType_Id where (P.Catagory_Id ='" + categoryId + "' OR '" + categoryId + "'='0' ) And (cus.Customer_Id ='" + customerId + "' OR '" + customerId + "'='0' ) And (inv.Invoice_Date <='" + dateTime_To + "' And inv.Invoice_Date >= '" + dateTime_From + "') And (invD.Active = 'true') And (inv.IsPromotion ='true') order by inv.Invoice_Date"; dt_InvoiceDetail = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_InvoiceDetail); }
public int UpdateCustomerOnlyActiveByCustomerId(DECustomer customer) { int int_Result; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "UPDATE tbl_Customer SET Active = @Active WHERE Customer_Id = @Customer_Id"; DeclareSqlCmdParameter(sqlCmd, customer); int_Result = SqlConjunction.GetSQLVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public int UpdateData(DECustomer customer) { int int_Result; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "UPDATE tbl_Customer SET Customer_Id= @Customer_Id, Customer_Description=@Customer_Description, Address = @Address, Phone = @Phone, Active = @Active ,ModifiedBy = @ModifiedBy ,ModifiedDate = @ModifiedDate, Catagory_Id = @Catagory_Id WHERE Customer_Id = @Customer_Id"; DeclareSqlCmdParameter(sqlCmd, customer); int_Result = SqlConjunction.GetSQLVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public int UpdateData(DEInvoiceNo invNo, SqlConnection SqlCon, SqlTransaction tn) { int int_Result; SqlCommand sqlCmd = new SqlCommand(" ", SqlCon, tn); sqlCmd.CommandText = "Update tbl_InvoiceNo SET Type = @Type , Year = @Year, PreFix = @PreFix , Current_Id = @Current_ID where Type = @Type"; DeclareSqlCmdParameter(sqlCmd, invNo); int_Result = SqlConjunction.GetSQLTransVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public int InsertData(DECustomerReturn customerReturn, SqlConnection SqlCon, SqlTransaction tn) { int int_Result; SqlCommand sqlCmd = new SqlCommand(" ", SqlCon, tn); sqlCmd.CommandText = "INSERT tbl_CustomerReturn VALUES(@CustomerReturn_Id,@Customer_Id,@ReturnDate,@Product_Id,@isCarton,@Qty,@Price,@Amount,@Remark,@Active,@ModifiedBy,@ModifiedDate)"; DeclareSqlCmdParameter(sqlCmd, customerReturn); int_Result = SqlConjunction.GetSQLTransVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public DataTable LoadCustomerReturnForAllDataByReturnDateAndCustomerIDAndProductCode(DateTime dateTime_From, DateTime dateTime_To, String product_Code, Int32 Customer_Id) { DataTable dt_CustomerReturn; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'RNo',cusR.CustomerReturn_Id as 'cusR_Id',cusR.Customer_Id,cus.Customer_Description, cusR.ReturnDate,cusR.Product_Id as 'RProduct_Id',P.Product_Code as 'RProduct_Code',P.Product_Description as 'RProduct_Description',cusR.Qty as 'RQty',CASE WHEN cusR.isCarton = 'True' then 'Cartons' ELSE 'Pcs' END as 'RUnits',cusR.Price as 'RRate',cusR.Amount as 'RAmount',cusR.Active FROM tbl_CustomerReturn cusR LEFT JOIN tbl_Customer cus on cusR.Customer_Id = cus.Customer_Id LEFT JOIN tbl_Product P ON cusR.Product_Id = P.Product_Id where cusR.ReturnDate <='" + dateTime_To + "' And cusR.ReturnDate >= '" + dateTime_From + "' And (P.Product_Code LIKE '%" + product_Code + "%' OR '" + product_Code + "'='') And (cusR.Customer_Id = '" + Customer_Id + "' OR '" + Customer_Id + "'='0') order by cusR.ModifiedDate"; //sqlCmd = DeclareSqlCmdParameter(sqlCmd, cusRetDetail); dt_CustomerReturn = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_CustomerReturn); }
public DataTable LoadCustomerReturnDetailTableForAllDataByReturnDateAndCustomerID(DateTime dateTime_From, DateTime dateTime_To, DECustomerReturn cusRetDetail) { DataTable dt_CustomerReturn; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'RNo',cusR.CustomerReturn_Id as 'cusR_Id',cusR.Customer_Id, cusR.ReturnDate,cusR.Product_Id as 'RProduct_Id',P.Product_Code as 'RProduct_Code',P.Product_Description as 'RProduct_Description',cusR.Qty as 'RQty',CASE WHEN cusR.isCarton = 'True' then 'Cartons' ELSE 'Pcs' END as 'RUnits',cusR.Price as 'RRate',cusR.Amount as 'RAmount',cusR.Active FROM tbl_CustomerReturn cusR LEFT JOIN tbl_Product P ON cusR.Product_Id = P.Product_Id where cusR.ReturnDate <='" + dateTime_To + "' And cusR.ReturnDate >= '" + dateTime_From + "' and cusR.Customer_Id = @Customer_Id order by cusR.ModifiedDate"; sqlCmd = DeclareSqlCmdParameter(sqlCmd, cusRetDetail); dt_CustomerReturn = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_CustomerReturn); }
public DataTable LoadInvoiceDetailTableForAllDataByInvoiceId(DEInvoiceDetail invoiceDetail) { DataTable dt_InvoiceDetail; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',invD.InvoiceDetail_Id,invD.Invoice_Id,invD.Product_Id,P.Product_Code,P.Product_Description,invD.Qty,CASE WHEN invD.isCarton = 'True' then 'Cartons' ELSE 'Pcs' END as 'Units',invD.Price as 'Rate',invD.Amount,invD.Active,invD.FOC as 'Remark' FROM tbl_InvoiceDetail invD LEFT JOIN tbl_Product P ON invD.Product_Id = P.Product_Id where invD.Invoice_Id = @Invoice_Id order by invD.ModifiedDate"; sqlCmd = DeclareSqlCmdParameter(sqlCmd, invoiceDetail); dt_InvoiceDetail = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_InvoiceDetail); }
public DataTable LoadCatagoryTableForAllDataByCatagoryDescription(DECustomerCategory catagory) { DataTable dt_Catagory; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',Cat.Catagory_Id,Cat.Catagory_Description,Cat.Active,Cat.ModifiedBy,Cat.ModifiedDate FROM tbl_CustomerCatagory Cat where Cat.Active = 'true' And Cat.Catagory_Description LIKE '%' + @Catagory_Description+ '%' order by Cat.Catagory_Description"; sqlCmd = DeclareSqlCmdParameter(sqlCmd, catagory); dt_Catagory = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_Catagory); }
public int InsertData(DECustomerCategory catagory) { int int_Result; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT @Catagory_Id = ISNULL(MAX(Catagory_Id),0)+1 FROM tbl_CustomerCatagory INSERT tbl_CustomerCatagory VALUES(@Catagory_Id,@Catagory_Description,@Active,@ModifiedBy,@ModifiedDate)"; DeclareSqlCmdParameter(sqlCmd, catagory); int_Result = SqlConjunction.GetSQLVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public DataTable LoadStockTableForAllData(DEStockIn stockIn) { DataTable dt_StockIn; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',StIn.StockInId,StIn.StockInDate,StIn.Product_Id,P.Product_Code,P.Product_Description,StIn.NoOfCartons,StIn.NoOfUnits FROM tbl_StockIn StIn LEFT JOIN tbl_Product P ON StIn.Product_Id = P.Product_Id where StIn.StockInDate = @StockInDate "; sqlCmd = DeclareSqlCmdParameter(sqlCmd, stockIn); dt_StockIn = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_StockIn); }
public DataTable LoadInvoiceDetailTableForAllDataByInvoiceDate(DEInvoiceDetail invoiceDetail, DateTime dateTime_From, DateTime dateTime_To) { DataTable dt_InvoiceDetail; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "SELECT 0 As 'No',invD.InvoiceDetail_Id,invD.Invoice_Id,invD.Product_Id,P.Product_Code,P.Product_Description,invD.Qty,CASE WHEN invD.isCarton = 'True' then 'Cartons' ELSE 'Pcs' END as 'Units',invD.Price as 'Rate',invD.Amount,invD.Active,invT.InvoiceType_Id,invT.InvoiceType_Description,Cus.Customer_Id,Cus.Customer_Description,inv.Invoice_No,inv.Invoice_Date FROM tbl_InvoiceDetail invD LEFT JOIN tbl_Product P ON invD.Product_Id = P.Product_Id LEFT JOIN tbl_Invoice inv ON invD.Invoice_Id = inv.Invoice_Id LEFT JOIN tbl_Customer Cus ON inv.Customer_Id = Cus.Customer_Id LEFT JOIN tbl_InvoiceType invT ON inv.InvoiceType_Id = invT.InvoiceType_Id where (invD.Product_Id = @Product_Id) And (inv.Invoice_Date <='" + dateTime_To + "' And inv.Invoice_Date >= '" + dateTime_From + "') And (invD.Active = 'true') order by inv.Invoice_Date"; sqlCmd = DeclareSqlCmdParameter(sqlCmd, invoiceDetail); dt_InvoiceDetail = SqlConjunction.GetSQLDataTable(sqlCmd); sqlCmd = null; return(dt_InvoiceDetail); }
private int updateActiveData(DEInvoiceDetail invoiceDetail, SqlConnection SqlCon, SqlTransaction tn) { int int_Result; SqlCommand sqlCmd = new SqlCommand(" ", SqlCon, tn); sqlCmd.CommandText = "Update tbl_InvoiceDetail Set Active = @Active where InvoiceDetail_Id = @InvoiceDetail_Id"; DeclareSqlCmdParameter(sqlCmd, invoiceDetail); int_Result = SqlConjunction.GetSQLTransVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public int DeleteData(DECustomerCategory catagory) { int int_Result; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "DELETE FROM tbl_CustomerCatagory WHERE Catagory_ID = @Catagory_Id"; DeclareSqlCmdParameter(sqlCmd, catagory); int_Result = SqlConjunction.GetSQLVoid(sqlCmd); sqlCmd = null; return(int_Result); }
private int DeleteData(DECustomerReturn cusReturn, SqlConnection SqlCon, SqlTransaction tn) { int int_Result; SqlCommand sqlCmd = new SqlCommand(" ", SqlCon, tn); sqlCmd.CommandText = "Delete From tbl_CustomerReturn where CustomerReturn_Id = @CustomerReturn_Id"; DeclareSqlCmdParameter(sqlCmd, cusReturn); int_Result = SqlConjunction.GetSQLTransVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public int InsertData(DEStockIn stockIn, SqlConnection SqlCon, SqlTransaction tn) { int int_Result; SqlCommand sqlCmd = new SqlCommand(" ", SqlCon, tn); sqlCmd.CommandText = "INSERT tbl_StockIn VALUES(@StockInId,@StockInDate,@Product_Id,@NoOfCartons,@NoOfUnits,@Carton_Price_Buying,@TotalAmount,@Active,@ModifiedBy,@ModifiedDate)"; DeclareSqlCmdParameter(sqlCmd, stockIn); int_Result = SqlConjunction.GetSQLTransVoid(sqlCmd); sqlCmd = null; return(int_Result); }
private int InsertData(DEInvoiceDetail invoiceDetail, SqlConnection SqlCon, SqlTransaction tn) { int int_Result; SqlCommand sqlCmd = new SqlCommand(" ", SqlCon, tn); sqlCmd.CommandText = "INSERT tbl_InvoiceDetail VALUES(@InvoiceDetail_Id,@Invoice_Id,@Product_Id,@isCarton,@Qty,@Price,@Amount,@FOC,@Active,@ModifiedDate)"; DeclareSqlCmdParameter(sqlCmd, invoiceDetail); int_Result = SqlConjunction.GetSQLTransVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public int UpdateData(DECustomerCategory catagory) { int int_Result; SqlCommand sqlCmd = new SqlCommand(); sqlCmd.CommandText = "UPDATE tbl_CustomerCatagory SET Catagory_Id= @Catagory_Id, Catagory_Description=@Catagory_Description, Active = @Active ,ModifiedBy = @ModifiedBy ,ModifiedDate = @ModifiedDate WHERE Catagory_Id = @Catagory_Id"; DeclareSqlCmdParameter(sqlCmd, catagory); int_Result = SqlConjunction.GetSQLVoid(sqlCmd); sqlCmd = null; return(int_Result); }
public int UpdateData(DEStockIn stockIn, SqlConnection SqlCon, SqlTransaction tn) { int int_Result; SqlCommand sqlCmd = new SqlCommand(" ", SqlCon, tn); sqlCmd.CommandText = "Update tbl_StockIn SET StockInId = @StockInId, StockInDate = @StockInDate, Product_Id = @Product_Id, NoOfCartons = @NoOfCartons,NoOfUnits = @NoOfUnits , Carton_Price_Buying = @Carton_Price_Buying, TotalAmount = @TotalAmount,Active = @Active, ModifiedBy = @ModifiedBy,ModifiedDate = @ModifiedDate where StockInId = @StockInId"; DeclareSqlCmdParameter(sqlCmd, stockIn); int_Result = SqlConjunction.GetSQLTransVoid(sqlCmd); sqlCmd = null; return(int_Result); }