protected void GetStatusCodesCourier() { try { List <clsStatusCodeCourierEDI> qStatusCode = SrvStatusCodeCourierEDI.GetStatusCodes(); comboxStatusCodes.DataSource = qStatusCode; comboxStatusCodes.DataTextField = "StatusCode"; comboxStatusCodes.DataValueField = "idStatusCodesCourierEDI"; comboxStatusCodes.DataBind(); } catch (Exception ex) { long lnewID = 0; clsExceptionLogging error = new clsExceptionLogging() { Method = GetCurrentMethod(), ExceptionMsg = ex.Message.ToString(), ExceptionType = ex.GetType().Name.ToString(), ExceptionURL = context.Current.Request.Url.ToString(), ExceptionSource = ex.StackTrace.ToString(), CreatedOn = DateTime.Now, CreatedBy = Session["userName"].ToString() }; SrvExceptionLogging.Insert(error, out lnewID); } }
private void Save() { int iFileformat = int.Parse(comboBxFileFormat214.SelectedValue); int iCommMethod = int.Parse(comboxCommunicationMethod.SelectedValue); int iTriggerMech = int.Parse(comboxTriggerMechanism.SelectedValue); int iTiming = int.Parse(comboxTiming.SelectedValue); clsEDIRecipReq qEDIRecipReq = SrvEDIRecipReq.GetEDIRecipReqsByID(Params.idEDIRecipReqs); qEDIRecipReq.idFileType = iFileformat; qEDIRecipReq.X12_ISA = txtBoxISA.Text; qEDIRecipReq.X12_GS = txtBoxGS.Text; qEDIRecipReq.X12_Qualifier = txtBoxQualifier.Text; qEDIRecipReq.idCommunicationMethod = iCommMethod; qEDIRecipReq.FTPAddress = textBoxFTPAddress.Text; qEDIRecipReq.UserName = textBoxUserName.Text; qEDIRecipReq.Password = textBoxPassword.Text; qEDIRecipReq.FolderPath = textBoxFolderPath.Text; qEDIRecipReq.Email = textBoxEmail.Text; qEDIRecipReq.idTriggerMechanism = iTriggerMech; qEDIRecipReq.idTiming = iTiming; TimeSpan?ts = timeTimeofFile.SelectedTime; qEDIRecipReq.TimeOfFile = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, ts.Value.Hours, ts.Value.Minutes, 0); qEDIRecipReq.PanelTitle = textBoxPanelTitle.Text; RadPanelBar1.Items[0].Text = qEDIRecipReq.PanelTitle; qEDIRecipReq.UpdatedBy = Session["userName"].ToString(); qEDIRecipReq.UpdatedOn = DateTime.Now; SrvEDIRecipReq.Insert(qEDIRecipReq); int idStatusCodesAll = 0; if (Params.ct == UserControlParams.CourierType.CourierEDI) { foreach (RadComboBoxItem rad in comboxStatusCodes.Items) { clsStatusCodeCourierEDI cEDI = SrvStatusCodeCourierEDI.GetStatusCodes().Where(p => p.idStatusCodesCourierEDI == int.Parse(rad.Value.ToString())).FirstOrDefault(); if (rad.Checked) { SrvStatusCodeAll.UpdatetatusCodeAll(new clsStatusCodeAll() { idStatusCodesAll = idStatusCodesAll, idEDIRecipReqs = qEDIRecipReq.idEDIRecipReqs, idStatusCodes = int.Parse(rad.Value.ToString()), StatusCode = cEDI.StatusCode, idEDITranscationType = SHIPMENT_STATUS_COURIER_EDI, CreatedBy = qEDIRecipReq.UpdatedBy, CreatedOn = DateTime.Now }); } else { SrvStatusCodeAll.Remove(qEDIRecipReq.idEDIRecipReqs, SHIPMENT_STATUS_COURIER_EDI, cEDI.idStatusCodesCourierEDI); } } } else if (Params.ct == UserControlParams.CourierType.NonCourierEDI) { foreach (RadComboBoxItem rad in comboxStatusCodes.Items) { clsStatusCodeNonCourierEDI cEDI = SrvStatusCodeNonCourierEDI.GetStatusCodes().Where(p => p.idStatusCodesNonCourierEDI == int.Parse(rad.Value)).FirstOrDefault(); if (rad.Checked) { SrvStatusCodeAll.UpdatetatusCodeAll(new clsStatusCodeAll() { idStatusCodesAll = idStatusCodesAll, idEDIRecipReqs = qEDIRecipReq.idEDIRecipReqs, idStatusCodes = int.Parse(rad.Value.ToString()), StatusCode = cEDI.StatusCode, idEDITranscationType = SHIPMENT_STATUS_NON_COURIER_EDI, CreatedBy = qEDIRecipReq.UpdatedBy, CreatedOn = DateTime.Now }); } else { SrvStatusCodeAll.Remove(qEDIRecipReq.idEDIRecipReqs, SHIPMENT_STATUS_NON_COURIER_EDI, cEDI.idStatusCodesNonCourierEDI); } } } }
private void getShippingVendors() { List <clsStatusCodeCourierEDI> listVend = SrvStatusCodeCourierEDI.GetStatusCodes().OrderBy(p => p.idStatusCodesCourierEDI).ToList(); rgGrid.DataSource = listVend; }