Example #1
0
 /// <summary>
 /// Verifies the does not exist in the database before the test runs just in case it runs out of order
 /// </summary>
 private void VerifyDoesNotExist()
 {
     if (Manufacturers.Exists(_databasePath, _manufacturersTestName, out _errOut))
     {
         long id = Manufacturers.GetId(_databasePath, _manufacturersTestName, out _errOut);
         Manufacturers.Delete(_databasePath, id, out _errOut);
     }
 }
Example #2
0
        public void DeleteTest()
        {
            VerifyExists();
            long id    = Manufacturers.GetId(_databasePath, _manufacturersTestName, out _errOut);
            bool value = Manufacturers.Delete(_databasePath, id, out _errOut);

            General.HasTrueValue(value, _errOut);
        }
Example #3
0
    protected void m_grid_RowDeleting(object sender, GridViewDeleteEventArgs e)
    {
        string message = "";

        try
        {
            Manufacturers m_Manufacturers = new Manufacturers();
            m_Manufacturers.ManufacturerId = System.Int32.Parse(m_grid.DataKeys[e.RowIndex].Value.ToString());
            m_Manufacturers.Delete();
        }
        catch (Exception ex)
        {
            sms.utils.Log.writeLog(ex.ToString(), ((new System.Diagnostics.StackTrace()).GetFrames()[0]).GetMethod().Name);
        }
        ShowGrid();
    }
Example #4
0
 protected void lbDelete_Click(object sender, EventArgs e)
 {
     try
     {
         Manufacturers m_Manufacturers = new Manufacturers();
         foreach (GridViewRow m_Row in m_grid.Rows)
         {
             CheckBox chkAction = (CheckBox)m_Row.FindControl("chkAction");
             if (chkAction != null)
             {
                 if (chkAction.Checked)
                 {
                     m_Manufacturers.ManufacturerId = System.Int32.Parse(m_grid.DataKeys[m_Row.RowIndex].Value.ToString());
                     m_Manufacturers.Delete();
                 }
             }
         }
         ShowGrid();
     }
     catch (Exception ex)
     {
         sms.utils.Log.writeLog(ex.ToString(), ((new System.Diagnostics.StackTrace()).GetFrames()[0]).GetMethod().Name);
     }
 }