private void FormEtrans835Edit_Load(object sender, EventArgs e) { if (_form835 != null && !_form835.IsDisposed) { if (!MsgBox.Show(this, true, "Opening another ERA will close the current ERA you already have open. Continue?")) { //Form already exists and user wants to keep current instance. TranSetId835 = _form835.TranSetId835; EtransCur = _form835.EtransCur; MessageText835 = _form835.MessageText835; } _form835.Close(); //Always close old form and open new form, so the new copy will come to front, since BringToFront() does not always work. } _form835 = this; //Set the static variable to this form because we're always going to show this form even if they're viewing old information. List <Etrans835Attach> listAttached = Etrans835Attaches.GetForEtrans(EtransCur.EtransNum); _x835 = new X835(EtransCur, MessageText835, TranSetId835, listAttached); RefreshFromDb(); FillAll(); Menu.MenuItemCollection menuItemCollection = new Menu.MenuItemCollection(gridClaimDetailsMenu); List <MenuItem> listMenuItems = new List <MenuItem>(); listMenuItems.Add(new MenuItem(Lan.g(this, "Go to Account"), new EventHandler(gridClaimDetails_RightClickHelper))); listMenuItems.Add(new MenuItem(Lan.g(this, "Add Tracking Status"), new EventHandler(gridClaimDetails_RightClickHelper))); //Enabled by default menuItemCollection.AddRange(listMenuItems.ToArray()); gridClaimDetails.ContextMenu = gridClaimDetailsMenu; gridClaimDetails.AllowSortingByColumn = true; }
private void gridEobs_CellDoubleClick(object sender,UI.ODGridClickEventArgs e) { FormEtrans835Edit Form835=new FormEtrans835Edit(); Form835.EtransCur=_etrans; Form835.MessageText835=_messageText835; Form835.TranSetId835=_listEobTranIds[gridEobs.SelectedIndices[0]]; Form835.Show(); }
private void gridEobs_CellDoubleClick(object sender, UI.ODGridClickEventArgs e) { FormEtrans835Edit Form835 = new FormEtrans835Edit(); Form835.EtransCur = _etrans; Form835.MessageText835 = _messageText835; Form835.TranSetId835 = _listEobTranIds[gridEobs.SelectedIndices[0]]; Form835.Show(); //Not attached to parent window because the user may have to close parent window to navigate other areas of the program. }
private void gridMain_DoubleClick(object sender, EventArgs e) { int index = gridMain.GetSelectedIndex(); if (index == -1) //Clicked in empty space. { return; } //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...) Cursor = Cursors.WaitCursor; Etrans et = (Etrans)gridMain.Rows[index].Tag; //Sadly this is needed due to FormEtrans835Edit calling Etranss.Update . //See Etranss.RefreshHistory(...), this query does not select all etrans columns. //Mimics FormClaimsSend.gridHistory_CellDoubleClick(...) et = Etranss.GetEtrans(et.EtransNum); FormEtrans835Edit.ShowEra(et); Cursor = Cursors.Default; }
private void FormEtrans835Edit_FormClosing(object sender, FormClosingEventArgs e) { _form835 = null; }
private void gridEras_CellDoubleClick(object sender, UI.ODGridClickEventArgs e) { FormEtrans835Edit.ShowEra(_listEtrans[gridEras.SelectedIndices[0]]); }
private void gridHistory_CellDoubleClick(object sender,ODGridClickEventArgs e) { Etrans et=Etranss.GetEtrans(PIn.Long(tableHistory.Rows[e.Row]["EtransNum"].ToString())); if(et.Etype==EtransType.StatusNotify_277) { FormEtrans277Edit Form277=new FormEtrans277Edit(); Form277.EtransCur=et; Form277.ShowDialog(); return;//No refresh needed because 277s are not editable, they are read only. } if(et.Etype==EtransType.ERA_835) { string messageText835=EtransMessageTexts.GetMessageText(et.EtransMessageTextNum); X12object x835=new X12object(messageText835); List<string> listTranSetIds=x835.GetTranSetIds(); if(et.TranSetId835=="" && listTranSetIds.Count>=2) { FormEtrans835PickEob formPickEob=new FormEtrans835PickEob(listTranSetIds,messageText835,et); formPickEob.ShowDialog(); } else {//Only one EOB in the 835. FormEtrans835Edit Form835=new FormEtrans835Edit(); Form835.EtransCur=et; Form835.MessageText835=messageText835; Form835.TranSetId835="";//Empty string will cause the first EOB in the 835 to display. Form835.ShowDialog(); } } else { FormEtransEdit FormE=new FormEtransEdit(); FormE.EtransCur=et; FormE.ShowDialog(); if(FormE.DialogResult!=DialogResult.OK) { return; } } int scroll=gridHistory.ScrollValue; FillHistory(); for(int i=0;i<tableHistory.Rows.Count;i++){ if(tableHistory.Rows[i]["EtransNum"].ToString()==et.EtransNum.ToString()){ gridHistory.SetSelected(i,true); } } gridHistory.ScrollValue=scroll; }