Example #1
0
 public frmEditCaseParty(EditCasePartyDTO edit, frmCodeGenarator parent)
 {
     InitializeComponent();
     this.edit = edit;
     _parent   = parent;
     this.Text = "Currently Editing: " + edit.PartyType;
 }
Example #2
0
        public void populateCaseParties(dynamic item)
        {
            string is_required = item["is_required"];
            string name        = item["name"];
            string code        = item["code"];


            var rfc4122bytes = Convert.FromBase64String("aguidthatIgotonthewire==");

            Array.Reverse(rfc4122bytes, 0, 4);
            Array.Reverse(rfc4122bytes, 4, 2);
            Array.Reverse(rfc4122bytes, 6, 2);
            var guid = new Guid(rfc4122bytes);

            //   var row = new ListViewItem(new[] { name, "", required, code, "", "Party_" + guid });
            EditCasePartyDTO caseParty = new EditCasePartyDTO()
            {
                Address    = "",
                PartyType  = name,
                Code       = code,
                IsRequired = (is_required == "True"),
                GUID       = "Party_" + guid
            };

            casePartiesList.Add(caseParty);
            RefreshPartiesTable();
        }
Example #3
0
        private void addcaseparty_Click(object sender, EventArgs e)
        {
            if (casepartytype.SelectedItem != null)
            {
                string name = (casepartytype.SelectedItem as dynamic).name;
                string code = (casepartytype.SelectedItem as dynamic).code;


                EditCasePartyDTO caseParty = new EditCasePartyDTO()
                {
                    Address    = "",
                    PartyType  = name,
                    Code       = code,
                    IsRequired = false
                };
                var rfc4122bytes = Convert.FromBase64String("aguidthatIgotonthewire==");
                Array.Reverse(rfc4122bytes, 0, 4);
                Array.Reverse(rfc4122bytes, 4, 2);
                Array.Reverse(rfc4122bytes, 6, 2);
                var guid = Guid.NewGuid();

                caseParty.GUID = "Party_" + guid;
                casePartiesList.Add(caseParty);
                RefreshPartiesTable();
            }
        }
Example #4
0
        private void caseparties_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            ListViewHitTestInfo info = caseparties.HitTest(e.X, e.Y);
            ListViewItem        item = info.Item;

            if (item != null)
            {
                MessageBox.Show("The selected Item Name is: " + item.Text);
                EditCasePartyDTO edit = new EditCasePartyDTO()
                {
                    RowIndex = item.Index,
                    FullName = item.SubItems[4].Text,
                    Address  = item.SubItems[5].Text
                };
                frmEditCaseParty frmEditCase = new frmEditCaseParty(edit);
                frmEditCase.ShowDialog();
            }
            else
            {
                this.caseparties.SelectedItems.Clear();
                MessageBox.Show("No Item is selected");
            }
        }
Example #5
0
 public void UpdatePartiesTable(EditCasePartyDTO caseParty)
 {
     casePartiesList = casePartiesList.Select(x => x.GUID == caseParty.GUID ? caseParty : x).ToList();
     RefreshPartiesTable();
 }