Ejemplo n.º 1
0
 private void tbtnDelete_Click(object sender, EventArgs e)
 {
     if (dgClusterList.SelectedRows.Count > 0)
     {
         if (MessageBox.Show(clsMessageBox.MessageBoxDeleteAsk, clsMessageBox.MessageBoxText, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             clsCluster cluster = new clsCluster();
             cluster.ClusterCode = dgClusterList.SelectedRows[0].Cells[0].Value.ToString();
             cluster.Delete();
             this.BindClusterGrid();
         }
     }
 }
Ejemplo n.º 2
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (this.IsCorrectData())
     {
         using (clsCluster cluster = new clsCluster())
         {
             cluster.ClusterName = txtClusterName.Text;
             cluster.Description = txtDescription.Text;
             cluster.Enabled     = "1";
             cluster.Insert();
         }
         _frmClusterList.BindClusterGrid();
         this.Close();
     }
 }
Ejemplo n.º 3
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     if (IsCorrectData())
     {
         using (clsCluster cluster = new clsCluster())
         {
             cluster.ClusterCode = _strClusterCode;
             cluster.ClusterName = txtClusterName.Text;
             cluster.Description = txtDescription.Text;
             cluster.Enabled     = (chkEnabled.Checked ? "1" : "0");
             cluster.Update();
         }
         _frmClusterList.BindClusterGrid();
         this.Close();
     }
 }
Ejemplo n.º 4
0
 private void BindDetails()
 {
     txtClusterCode.Text = _strClusterCode;
     using (clsCluster cluster = new clsCluster())
     {
         cluster.ClusterCode = _strClusterCode;
         cluster.Fill();
         txtClusterName.Text  = cluster.ClusterName;
         txtDescription.Text  = cluster.Description;
         chkEnabled.Checked   = (cluster.Enabled == "1" ? true : false);
         txtCreatedBy.Text    = cluster.CreateBy;
         txtCreateDate.Text   = cluster.CreateOn.ToString("MMM dd, yyyy hh:mm tt");
         txtModifiedBy.Text   = cluster.UpdateBy;
         txtDateModified.Text = cluster.UpdateOn.ToString("MMM dd, yyyy hh:mm tt");
     }
 }