Пример #1
0
        private void TransferJob()
        {
            try
            {
                int ThirdPartyCompanyId = ddlThirdPartyCompany.SelectedValue.ToInt();
                if (ThirdPartyCompanyId == 0)
                {
                    ENUtils.ShowMessage("Required : Company to transfer job");
                    return;
                }



                using (TaxiDataContext db = new TaxiDataContext())
                {
                    db.stp_TransferJob(this.JobId, ThirdPartyCompanyId, numTransferJobCommission.Value.ToDecimal());
                }

                new BroadcasterData().BroadCastToAll(RefreshTypes.REFRESH_BOOKING_DASHBOARD);

                if (Application.OpenForms.OfType <Form>().Count(c => c.Name == "frmBookingsList") > 0)
                {
                    (Application.OpenForms.OfType <Form>().FirstOrDefault(c => c.Name == "frmBookingsList") as frmBookingsList).SetRefreshWhenActive("");
                }

                this.Close();

                //}
            }
            catch (Exception ex)
            {
                ENUtils.ShowMessage(ex.Message);
            }
        }