public static void update(Guid Id, string Code, string Description) { QueueCategory objOld = new QueueCategory(Id); string log = ""; log = Util.appendChange(log, objOld.Code, Code, "Code: '{0}' to '{1}'"); log = Util.appendChange(log, objOld.Description, Description, "Description: '{0}' to '{1}'"); if (string.IsNullOrEmpty(log)) { Util.displayMessageBoxError("No changes to record"); } else { SqlQueryResult result = DBConnection.query( false, DBConnection.ActiveSqlConnection, QueryTypes.ExecuteNonQuery, "QueueCategories_update", new SqlQueryParameter(COL_DB_Id, SqlDbType.UniqueIdentifier, Id), new SqlQueryParameter(COL_DB_Code, SqlDbType.NVarChar, Util.wrapNullable(Code)), new SqlQueryParameter(COL_DB_Description, SqlDbType.NVarChar, Util.wrapNullable(Description)) ); } }
protected override void populateInputFields() { QueueCategory obj = new QueueCategory(selectedRowID()); itxt_Code.ValueText = obj.Code; itxt_Description.ValueText = obj.Description; }
private void populateData() { Util.populateDataGridView(dgv, QueueCategory.get(false, null, null, null, Settings.QueueNoCutoffTimestamp)); //set button text as combination of code and description //DataGridViewButtonCell button; //foreach (DataGridViewRow row in dgv.Rows) //{ // button = ((DataGridViewButtonCell)row.Cells[col_dgv_CallerButton.Name]); // button.Value = row.Cells[col_dgv_CallerText.Name].Value.ToString(); //set button text // if (Convert.ToInt32(row.Cells[col_dgv_PendingCount.Name].Value) <= 0) // { // button.FlatStyle = FlatStyle.Popup; // button.Style.ForeColor = Color.Gray; // } // else // { // button.FlatStyle = FlatStyle.Standard; // button.Style.ForeColor = Color.Black; // } //} if (_lastCategoryCount != dgv.Rows.Count) { _lastCategoryCount = dgv.Rows.Count; fitContent(); setAndStartTimer(); } }
private void populateData() { Util.populateDataGridView(dgv, QueueCategory.get(false, null, null, null, Settings.QueueNoCutoffTimestamp)); //update button text //foreach (DataGridViewRow row in dgv.Rows) // ((DataGridViewButtonCell)row.Cells[col_dgv_RequestButton.Name]).Value = row.Cells[col_dgv_RequestText.Name].Value.ToString(); }
protected override void add() { QueueCategory.add(itxt_Code.ValueText, itxt_Description.ValueText); }
protected override void update() { QueueCategory.update(selectedRowID(), itxt_Code.ValueText, itxt_Description.ValueText); }
protected override System.Data.DataView loadGridviewDataSource() { return(QueueCategory.get(chkIncludeInactive.Checked, null, itxt_Code.ValueText, itxt_Description.ValueText, null).DefaultView); }
protected override void updateActiveStatus(Guid id, Boolean activeStatus) { QueueCategory.updateActiveStatus(id, activeStatus); }