Example #1
0
        private void btnClear_Click(object sender, RoutedEventArgs e)
        {
            ServiceRow row = new ServiceRow();

            if (lstFieldService.Items.Count > 0)
            {
                if (lstFieldService.SelectedItem != null)
                {
                    row.IsClear    = true;
                    row.BarPos     = Pos;
                    row.JobID      = (lstFieldService.SelectedItem as DataRowView).Row["JobID"].ToString();
                    row.LoggedDate = (lstFieldService.SelectedItem as DataRowView).Row["LoggedDate"].ToString();
                    row.Fault      = (lstFieldService.SelectedItem as DataRowView).Row["Fault"].ToString();
                    row.DownTime   = (lstFieldService.SelectedItem as DataRowView).Row["DownTime"].ToString();
                    row.sAsset     = Asset;

                    ViewClearServiceCall clearService = new ViewClearServiceCall(row);
                    clearService.Owner = Window.GetWindow(this);
                    clearService.ShowDialog();
                    PopulateOpenCalls(Pos);
                    common.CustomPaging(BMC.Presentation.Helper_classes.Common.PagingMode.Next, serviceCalls, NoOfRecPerPage, lstFieldService, true);
                    common.DisplayPagingInfo(serviceCalls, common, NoOfRecPerPage);
                }
                else
                {
                    MessageBox.ShowBox("MessageID66", BMC_Icon.Warning);
                }
            }
            else
            {
                MessageBox.ShowBox("MessageID67", BMC_Icon.Warning);
            }
        }
        private void btnClear_Click(object sender, RoutedEventArgs e)
        {
            ServiceRow row = new ServiceRow();

            if (lstFieldService.Items.Count > 0)
            {
                if (lstFieldService.SelectedItem != null)
                {
                    row.IsClear = true;
                    row.BarPos = Pos;
                    row.JobID = (lstFieldService.SelectedItem as DataRowView).Row["JobID"].ToString();
                    row.LoggedDate = (lstFieldService.SelectedItem as DataRowView).Row["LoggedDate"].ToString();
                    row.Fault = (lstFieldService.SelectedItem as DataRowView).Row["Fault"].ToString();
                    row.DownTime = (lstFieldService.SelectedItem as DataRowView).Row["DownTime"].ToString();
                    row.sAsset = Asset;

                    ViewClearServiceCall clearService = new ViewClearServiceCall(row);
                    clearService.Owner = Window.GetWindow(this);
                    clearService.ShowDialog();
                    PopulateOpenCalls(Pos);
                    common.CustomPaging(BMC.Presentation.Helper_classes.Common.PagingMode.Next, serviceCalls, NoOfRecPerPage, lstFieldService, true);
                    common.DisplayPagingInfo(serviceCalls, common, NoOfRecPerPage);
                }
                else
                    MessageBox.ShowBox("MessageID66", BMC_Icon.Warning);
            }
            else
                MessageBox.ShowBox("MessageID67", BMC_Icon.Warning);
        }