예제 #1
0
 private void ParamsGrid_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
 {
     if (!SaveData())
     {
         return;
     }
     MultiXTpmDB.ParamRow Row = m_DS.Param.FindByID((int)ParamsGrid.DataKeys[e.Item.ItemIndex]);
     foreach (MultiXTpmDB.LinkParamsRow PRow    in      Row.GetLinkParamsRows())
     {
         if (PRow.LinkID == m_LinkID)
         {
             PRow.Delete();
             break;
         }
     }
     BindAll();
 }
예제 #2
0
 private void ProcessesGrid_DeleteCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
 {
     if (!SaveData())
     {
         return;
     }
     MultiXTpmDB.ProcessClassRow Row = m_DS.ProcessClass.FindByID((int)ProcessesGrid.DataKeys[e.Item.ItemIndex]);
     foreach (MultiXTpmDB.GroupProcessClassesRow PRow    in      Row.GetGroupProcessClassesRows())
     {
         if (PRow.GroupID == m_GroupID)
         {
             PRow.Delete();
             break;
         }
     }
     BindAll();
 }
        private void load_als_contact(AdvFilterDataset.personenlijstRow plr)
        {
            AdvFilterDatasetTableAdapters.persoonTableAdapter persadapt = new AdvFilterDatasetTableAdapters.persoonTableAdapter();
            persadapt.Connection.ConnectionString = Global.ConnectionString_fileserver;
            AdvFilterDataset.persoonDataTable    perstable           = new AdvFilterDataset.persoonDataTable();
            filterd_box.Filter_adv_listDataTable persoon_nrs         = new filterd_box.Filter_adv_listDataTable();
            filterd_boxTableAdapters.functiepersoonTableAdapter fpta = new filterd_boxTableAdapters.functiepersoonTableAdapter();
            fpta.Connection.ConnectionString = Global.ConnectionString_fileserver;
            items.Clear();
            persadapt.Fill(perstable);
            filterd_box.functiepersoonDataTable fpdt = fpta.GetData();
            ////////////
            if (!include_all)
            {
                if (plr.var == 1)
                {
                    var colnaam_houder = from i in pers_nr_loc_dt.AsEnumerable() where i.regel_nr != 1 select i.column;
                    foreach (var x in colnaam_houder)
                    {
                        persoon_nrs.Merge(FTA.GetData(x.ToString()));
                    }

                    //var colnaam_houder = from i in pers_nr_loc_dt.AsEnumerable() where i.regel_nr == plr.tmpnr select i.column;
                    //string colnaam = string.Empty;
                    //foreach (var x in colnaam_houder)
                    //{
                    //    colnaam = x.ToString();
                    //}
                    //persoon_nrs = FTA.GetData(colnaam);

                    var koppl      = from k in fpdt.AsEnumerable() where k.IsADV_koppel_nrNull() == false && k.ADV_koppel_nr == plr.tmpnr select k.functie_ID;
                    int functie_ID = 0;
                    foreach (var x in koppl)
                    {
                        if (int.TryParse(x.ToString(), out functie_ID))
                        {
                            persoon_nrs.Merge(FTA.GetDataBypersoonvar(functie_ID));
                        }
                    }
                }
                else
                {
                    persoon_nrs = FTA.GetDataBypersoonvar(plr.tmpnr);
                }
            }

            ///////////////
            foreach (AdvFilterDataset.persoonRow PRow in perstable)
            {
                if (Is_in_list(persoon_nrs, PRow.persoon_nr))
                {
                    string volnaam = "";
                    if (!PRow.IsachternaamNull())
                    {
                        volnaam += PRow.achternaam + ", ";
                    }
                    if (!PRow.IsvoorlettersNull())
                    {
                        volnaam += "(" + PRow.voorletters + ") ";
                    }
                    if (!PRow.IsvoornaamNull())
                    {
                        volnaam += PRow.voornaam + " ";
                    }
                    if (!PRow.IstussenvoegselNull())
                    {
                        volnaam += PRow.tussenvoegsel;
                    }

                    items.Add(new multiItem
                    {
                        naam       = volnaam,
                        informatie = PRow.bedrijfnaam,
                        nummer     = PRow.persoon_nr
                    });
                }
            }
        }