Example #1
0
    protected void DeleteButton_Click(object sender, EventArgs e)
    {
        try
        {
            ClsVersion aClsVersionObj = new ClsVersion();
            aClsVersionObj.VersionId   = VersionIdTextBox.Text.Trim();
            aClsVersionObj.VersionName = VersionNameTextBox.Text.Trim();
            aClsVersionObj.ClassId     = ddlClassName.SelectedValue;

            aClsVersionManagerObj.DeleteVersionInfo(aClsVersionObj);
            RefreshAll();
            ClientScript.RegisterStartupScript(this.GetType(), "ale", "alert('Information delete successfully');", true);
        }
        catch (FormatException fex)
        {
            ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('" + fex.Message + "');", true);
        }
        catch (Exception ex)
        {
            if (ex.Message.Contains("Database"))
            {
                ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('Database Maintain Error. Contact to the Software Provider..!!');", true);
            }
            else
            {
                ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('There is some problem to do the task. Try again properly.!!');", true);
            }
        }
    }
Example #2
0
 protected void Application_Start()
 {
     AreaRegistration.RegisterAllAreas();
     this.RegisterGlobalFilters(GlobalFilters.Filters);
     this.RegisterRoutes(RouteTable.Routes);
     //this.RegisterBundles(BundleTable.Bundles);
     ObjVersion = new ClsVersion();
 }
Example #3
0
    public void UpdateVersionInfo(ClsVersion aClsVersionObj)
    {
        string connectionString = DataManager.OraConnString();
        string update           = @"UPDATE [version_info]
   SET [version_name] = '" + aClsVersionObj.VersionName + "',[class_id] = '" + aClsVersionObj.ClassId + "' WHERE [version_id] = '" + aClsVersionObj.VersionId + "'";

        DataManager.ExecuteNonQuery(connectionString, update);
    }
Example #4
0
    public void DeleteVersionInfo(ClsVersion aClsVersionObj)
    {
        string connectionString = DataManager.OraConnString();
        string delete           = @"DELETE FROM [version_info]
      WHERE [version_id] = '" + aClsVersionObj.VersionId + "'";

        DataManager.ExecuteNonQuery(connectionString, delete);
    }
Example #5
0
    public void SaveVersionInfo(ClsVersion aClsVersionObj)
    {
        string connectionString = DataManager.OraConnString();
        string insert           = @"INSERT INTO [version_info]
           ([id]
           ,[version_id]
           ,[version_name]
           ,[class_id])
        VALUES('" + aClsVersionObj.VersionId + "','" + aClsVersionObj.VersionId + "','" + aClsVersionObj.VersionName + "','" + aClsVersionObj.ClassId + "')";

        DataManager.ExecuteNonQuery(connectionString, insert);
    }