public void Delete(Guid _idPurchLine) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_POLineDelete", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("id_PurchLine", SqlDbType.UniqueIdentifier, _idPurchLine)); cmd.ExecuteNonQuery(); } } }
public void UpdateIfPasswordChanged(string _idMember) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_UpdateIfPasswordChanged", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("id", SqlDbType.NVarChar, _idMember)); cmd.ExecuteNonQuery(); } } }
public List <clsWareHouses> LoadWareHouses() { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_GetWareHouses", connection)) { cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adapter.Fill(ds); List <clsWareHouses> all = Load(ds.Tables[0]); return(all); } } }
public List <VendorPO> LoadAllPO() { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_GetVendorPOInProcess", connection)) { cmd.CommandType = CommandType.StoredProcedure; SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adapter.Fill(ds); List <VendorPO> all = Load(ds.Tables[0]); return(all); } } }
public static Member GetMemberByLogin(string login) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_GetUserById", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("Email", SqlDbType.NVarChar, login)); SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adapter.Fill(ds); Member all = Load(ds.Tables[0]); return(all); } } }
public void UpdatePOLines(PurchOrderLines _PurchOrderLines) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_UpdateVendorPOLines", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("id_PurchLine", SqlDbType.UniqueIdentifier, _PurchOrderLines.id_PurchLine)); cmd.Parameters.Add(new CustomSqlParameter("UnitPrice", SqlDbType.Float, _PurchOrderLines.UnitPrice)); cmd.Parameters.Add(new CustomSqlParameter("Quantity", SqlDbType.Float, _PurchOrderLines.Quantity)); cmd.Parameters.Add(new CustomSqlParameter("Amount", SqlDbType.Float, _PurchOrderLines.Amount)); cmd.Parameters.Add(new CustomSqlParameter("ProdCode", SqlDbType.NVarChar, _PurchOrderLines.ProdCode)); cmd.ExecuteNonQuery(); } } }
public List <PurchOrderLines> LoadVendorPOLines(Guid idPo) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_GetVendorPOLines", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("id_PurchOrder", SqlDbType.UniqueIdentifier, idPo)); SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adapter.Fill(ds); List <PurchOrderLines> all = Load(ds.Tables[0]); return(all); } } }
public List <WareHouseProducts> LoadWareHouseProducts(string _VendorCode) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_GetVendorProducts", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("VendorCode", SqlDbType.NVarChar, _VendorCode)); SqlDataAdapter adapter = new SqlDataAdapter(cmd); DataSet ds = new DataSet(); adapter.Fill(ds); List <WareHouseProducts> all = Load(ds.Tables[0]); return(all); } } }
public void UpdateVendorPO(VendorPO _VendorPO) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_UpdateVendorPO", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("id_PurchOrder", SqlDbType.UniqueIdentifier, _VendorPO.id_PurchOrder)); cmd.Parameters.Add(new CustomSqlParameter("PurchOrderStatus", SqlDbType.NVarChar, _VendorPO.PurchOrderStatus)); cmd.Parameters.Add(new CustomSqlParameter("PurchDate", SqlDbType.DateTime, _VendorPO.PurchDate)); cmd.Parameters.Add(new CustomSqlParameter("PODeliveryDate", SqlDbType.DateTime, _VendorPO.PODeliveryDate)); cmd.ExecuteNonQuery(); } } }
public void UpdateVendorcodeBassatineUsers(String Id, String _VendorCode, Boolean _userisAdmin, Boolean _userisActive, Boolean _PasswordChanged) { using (CustomSqlConnection connection = new CustomSqlConnection()) { using (SqlCommand cmd = new SqlCommand("sp_UpdateVendorUsers", connection)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new CustomSqlParameter("Id", SqlDbType.NVarChar, Id)); cmd.Parameters.Add(new CustomSqlParameter("VendorCode", SqlDbType.NVarChar, _VendorCode)); cmd.Parameters.Add(new CustomSqlParameter("userisAdmin", SqlDbType.Bit, _userisAdmin)); cmd.Parameters.Add(new CustomSqlParameter("isActive", SqlDbType.Bit, _userisActive)); cmd.Parameters.Add(new CustomSqlParameter("PasswordChanged", SqlDbType.Bit, _PasswordChanged)); cmd.ExecuteNonQuery(); } } }