Beispiel #1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     foreach (System.Data.DataRowView item in clbc.CheckedItems)
     {
         Datasource.dsData.CategoryItemRow row = (Datasource.dsData.CategoryItemRow)item.Row;
         _cats.Add((int)row.CategoryItemId);
     }
     DialogResult = System.Windows.Forms.DialogResult.OK;
     return;
 }
Beispiel #2
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     string[] lines;
     //Header
     lines = tbHeadser.EditValue.ToString().Split(';');
     foreach (string line in lines)
     {
         if (line.Trim() == string.Empty)
         {
             continue;
         }
         _headerList.Add(line.Trim());
     }
     //Body
     lines = tbBody.EditValue.ToString().Split(';');
     foreach (string line in lines)
     {
         if (line.Trim() == string.Empty)
         {
             continue;
         }
         _bodyList.Add(line.Trim());
     }
     //Footer
     lines = tbFooter.EditValue.ToString().Split(';');
     foreach (string line in lines)
     {
         if (line.Trim() == string.Empty)
         {
             continue;
         }
         _footerList.Add(line.Trim());
     }
     foreach (System.Data.DataRowView item in clbc.CheckedItems)
     {
         Datasource.dsData.CategoryItemRow row = (Datasource.dsData.CategoryItemRow)item.Row;
         _cats.Add((int)row.CategoryItemId);
     }
     DialogResult = System.Windows.Forms.DialogResult.OK;
     return;
 }
Beispiel #3
0
 private void UpdateRow(Datasource.dsData.CategoryItemRow row)
 {
     try
     {
         gridViewMain.ShowLoadingPanel();
         row.EndEdit();
         int effected = categoryItemTableAdapter.Update(row);
         if (effected == 0)
         {
             MessageBox.Show("No data saved ...", "information", MessageBoxButtons.OK, MessageBoxIcon.Information);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     if (gridViewMain.LoadingPanelVisible)
     {
         gridViewMain.HideLoadingPanel();
     }
 }