public bool AddTWeighingBarCodePrint(TWeighingBarCodePrint tweighingbarcodeprint) { SqlCommand cmd; cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "AddTWeighingBarCodePrint"; cmd.Parameters.AddWithValue("@PkSrNo", tweighingbarcodeprint.PkSrNo); cmd.Parameters.AddWithValue("@ItemNo", tweighingbarcodeprint.ItemNo); cmd.Parameters.AddWithValue("@BarCode", tweighingbarcodeprint.BarCode); cmd.Parameters.AddWithValue("@ActualQuantity", tweighingbarcodeprint.ActualQuantity); cmd.Parameters.AddWithValue("@Quantity", tweighingbarcodeprint.Quantity); cmd.Parameters.AddWithValue("@FKRateSettingNo", tweighingbarcodeprint.FKRateSettingNo); cmd.Parameters.AddWithValue("@MacNo", tweighingbarcodeprint.MacNo); cmd.Parameters.AddWithValue("@UserID", tweighingbarcodeprint.UserID); commandcollection.Add(cmd); return(true); }
public bool DeleteTWeighingBarCodePrint(TWeighingBarCodePrint tweighingbarcodeprint) { SqlCommand cmd; cmd = new SqlCommand(); cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = "DeleteTWeighingBarCodePrint"; cmd.Parameters.AddWithValue("@MacNo", tweighingbarcodeprint.MacNo); cmd.Parameters.AddWithValue("@UserID", tweighingbarcodeprint.UserID); if (ObjTrans.ExecuteNonQuery(cmd, CommonFunctions.ConStr) == true) { return(true); } else { tweighingbarcodeprint.msg = ObjTrans.ErrorMessage; return(false); } }