Ejemplo n.º 1
0
 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();
         }
     }
 }
Ejemplo n.º 2
0
        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();
                }
            }
        }
Ejemplo n.º 3
0
 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);
         }
     }
 }
Ejemplo n.º 4
0
 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);
         }
     }
 }
Ejemplo n.º 5
0
 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);
         }
     }
 }
Ejemplo n.º 6
0
 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();
         }
     }
 }
Ejemplo n.º 7
0
 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);
         }
     }
 }
Ejemplo n.º 8
0
 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);
         }
     }
 }
Ejemplo n.º 9
0
        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();
                }
            }
        }
Ejemplo n.º 10
0
        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();
                }
            }
        }