public AfspraakPopup(AfspraakBlok lb, DetailsWindow parWin, AfspraakMaker parent)
 {
     InitializeComponent();
     linkedBlok  = lb;
     DwParent    = parWin;
     MakerParent = parent;
 }
Ejemplo n.º 2
0
        private void addProduct()
        {
            DetailsWindow window = new DetailsWindow();

            window.Show();
            Messenger.Default.Send <string>("Add");
        }
Ejemplo n.º 3
0
        /// <summary>
        /// On double click event
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ListBox_DoubleClick(object sender, RoutedEventArgs e)
        {
            int index = listBox.SelectedIndex;

            if (index < 0)
            {
                return;
            }
            Password      pas    = new Password(mainController.PasswordManager.GetPassword(index));
            DetailsWindow window = new DetailsWindow(pas); //add new constructor

            if ((bool)window.ShowDialog() == false)
            {
                UpdateGUI();
                return;
            }
            else
            {
                pas = new Password(window.GetName, window.Password);
                if (mainController.PasswordManager.UpdatePassword(index, pas))
                {
                    UpdateGUI();
                    return;
                }
            }
        }
        private void Img_MouseRightButtonDown(object sender, MouseButtonEventArgs e)
        {
            var           img           = (Image)sender;
            DetailsWindow detailsWindow = new DetailsWindow(new Doujin((int)img.Tag));

            detailsWindow.Show();
        }
 private void ButtonDetails_Click(object sender, RoutedEventArgs e)
 {
     if (mModel.CurrentPerson != null)
     {
         DetailsWindow w = new DetailsWindow(mModel);
         w.ShowDialog();
     }
 }
        public void Details(object selectedItem, double height = 0.0, double width = 0.0)
        {
            EventViewModel @event = Mapping.Mapper.Map <EventViewModel>(selectedItem as DataRowView);
            Window         win    = new DetailsWindow(@event);

            WindowHelper.SetModal(win, height, width);
            win.ShowDialog();
        }
        private void NewUserBtn_Click(object sender, RoutedEventArgs e)
        {
            DetailsWindow dw = new DetailsWindow();

            dw.Height = 450;
            dw.ContentPanel.Children.Add(new NewUserControl(dw));
            dw.Width = 600;             //dw.Height = 770;
            dw.Show();
        }
        public DiscountAuthorizer(double totalprice, double oldPrice, double oldkorting, DetailsWindow parent)
        {
            InitializeComponent();
            BasePrice        = totalprice + oldkorting;
            OldKortingBedrag = oldkorting;
            OldPrice         = oldPrice - OldKortingBedrag;

            OldBasePrice = OldPrice + OldKortingBedrag;
            Parent       = parent;
        }
Ejemplo n.º 9
0
        private void Favorite_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            StackPanel current      = (StackPanel)sender;
            var        selected     = current.DataContext;
            SanPham    product      = (SanPham)selected;
            var        detailScreen = new DetailsWindow(product);

            this.Hide();
            detailScreen.ShowDialog();
            this.Show();
            product.LuotXem++;
            product.EditView();
        }
Ejemplo n.º 10
0
        private void BtnProduct_Click(object sender, RoutedEventArgs e)
        {
            Button  btn          = (Button)sender;
            var     selected     = btn.DataContext;
            SanPham product      = (SanPham)selected;
            var     detailScreen = new DetailsWindow(product);

            this.Hide();
            detailScreen.ShowDialog();
            this.Show();
            product.LuotXem++;
            product.EditView();
        }
Ejemplo n.º 11
0
        private void editProduct()
        {
            if (Product == null)
            {
                MessageBox.Show("You have to select element on the list first.", "Warning");
                return;
            }
            DetailsWindow window = new DetailsWindow();

            window.ShowDialog();
            Messenger.Default.Send <Product>(Product);
            Messenger.Default.Send <string>("Edit");
        }
        private void ListBox_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            var MagKiezen = true;
            var blok      = ((sender as ListBox).SelectedItem as AfspraakBlok);

            foreach (var dag in (DataContext as AfspraakDagen).Dagen)
            {
                foreach (var blk in dag.Blokken)
                {
                    if (blk.BlokID != blok.BlokID && blk.EigenaarNR == Acumulator.Instance().HuidigGebruiker.ID&& blk.Status == AfspraakStatus.Gekozen)
                    {
                        MagKiezen = false;
                    }
                }
            }
            if (!MagKiezen)
            {
                MessageBox.Show("U kunt maar 1 afspraak tegelijk maken. Annuleer eerst uw andere afspraak.");
            }
            else
            {
                if (blok != null)
                {
                    var arche = DataContext as AfspraakDagen;
                    var dag   = arche.Dagen.Where(x => x.Blokken.Contains(blok)).FirstOrDefault();

                    var popinf = new AfspraakPopupInfo
                    {
                        Adviseur      = arche.Adviseur,
                        DagNaam       = dag.DagNaam,
                        Datum         = dag.Datum,
                        StartTijd     = blok.StartTijd,
                        EindTijd      = blok.EindTijd,
                        Status        = blok.Status,
                        LocatieNaam   = arche.AdresNaam,
                        LocatieStraat = arche.AdresStraat,
                        LocatiePlaats = arche.AdresPlaats,
                    };

                    var pop = new DetailsWindow();


                    var afpop = new AfspraakPopup(blok, pop, this);
                    afpop.DataContext = popinf;
                    pop.LoadContent(afpop);
                    pop.Height = 340;
                    pop.Width  = 440;
                    pop.Show();
                }
            }
        }
Ejemplo n.º 13
0
        private static void ShowContextDetails()
        {
            var hitTestResult = Api.Client.UI.GetVisualInPointedPosition();

            if (hitTestResult == null)
            {
                return;
            }

            if (VisualTreeHelperExtension.FindParentOfType(
                    hitTestResult, typeof(ItemSlotControl)) is ItemSlotControl itemSlotControl)
            {
                if (itemSlotControl.Item != null)
                {
                    DetailsWindow.Open(
                        EntityViewModelsManager.GetEntityViewModel(itemSlotControl.Item.ProtoItem));
                }

                return;
            }

            if (VisualTreeHelperExtension.FindParentOfType(
                    hitTestResult, typeof(RequiredItemControl)) is RequiredItemControl requiredItemControl)
            {
                if (requiredItemControl.ProtoItemWithCount != null)
                {
                    DetailsWindow.Open(
                        EntityViewModelsManager.GetEntityViewModel(requiredItemControl.ProtoItemWithCount.ProtoItem));
                }

                return;
            }

            if (VisualTreeHelperExtension.FindParentOfType(
                    hitTestResult, typeof(EntitySlotControl)) is EntitySlotControl entitySlotControl)
            {
                if (entitySlotControl.DataContext is ProtoEntityViewModel entityViewModel)
                {
                    DetailsWindow.Open(entityViewModel);
                }
                else
                {
                    Api.Logger.Error("CNEI: Wrong view model for details window " + entitySlotControl.DataContext);
                }
            }
        }
Ejemplo n.º 14
0
        private static void ResetHandler()
        {
            DetailsWindow.Close();

            CreativePanelManager.Reset();

            hudButton?.Dispose();
            hudButton = null;

            if (hudLayoutControl != null)
            {
                hudLayoutControl.Loaded -= LayoutControl_Loaded;
                hudLayoutControl         = null;
            }

            gameplayInputContext?.Stop();
            gameplayInputContext = null;
        }
        public void Activate(string result)
        {
            if (result == "yes")
            {
                string sql;
                sql  = "DELETE FROM data_list ";
                sql += "WHERE person_id='" + Session["PationID"].ToString() + "' ";
                sql += "AND dialysis_date='" + Session["DialysisDate"].ToString() + "' ";
                sql += "AND dialysis_time='" + Session["DialysisTime"].ToString() + "'; ";

                sql += "DELETE FROM clinical2_nurse ";
                sql += "WHERE cln2_patic='" + Session["PationID"].ToString() + "' ";
                sql += "AND cln2_date='" + Session["DialysisDate"].ToString() + "' ";
                sql += "AND cln2_time='" + Session["DialysisTime"].ToString() + "'; ";

                db.Excute(sql);
                DetailsWindow.Close();
                show_grid();
                X.Msg.Notify("提示", "已经删除明细").Show();
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Add new button event for adding new passwords
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ButtonAddNew_Click(object sender, RoutedEventArgs e)
        {
            DetailsWindow window = new DetailsWindow(); //add new constructor

            if ((bool)window.ShowDialog() == false)
            {
                UpdateGUI();
                return;
            }
            else
            {
                Password pas = new Password(window.GetName, window.Password);
                if (mainController.PasswordManager.AddIfPossible(pas))
                {
                    UpdateGUI();
                    return;
                }
                else
                {
                    MessageBox.Show("Password with that name already exists");
                }
            }
        }
        private void LoadAfspraken()
        {
            var afspMaker = new AfspraakMaker();

            afspMaker.ReloadData();
            //var AfspraakSet = AfspraakBase.LoadAfspraken();

            if (afspMaker != null && !String.IsNullOrEmpty(Acumulator.Instance().Projectnr))
            {
                //afspMaker.SetContext(AfspraakSet);
                var holder = new DetailsWindow();
                afspMaker.DwParent = holder;
                holder.Width       = 820;
                holder.Height      = 500;
                holder.LoadContent(afspMaker);
                holder.Show();
            }
            else
            {
                //text select project first
                MessageBox.Show("Geen Project geselecteerd!");
            }
        }
Ejemplo n.º 18
0
        protected void SaveSelRow(object sender, DirectEventArgs e)
        {
            string sql = "";
            string drg_code, drg_intake, drg_freq, drg_medway;
            string toDay  = DateTime.Now.ToString("yyyy-MM-dd");
            string toTime = DateTime.Now.ToString("HH:mm");

            string[] StrArray = new string[4];

            RowSelectionModel sm = this.Grid_DrugTerm.GetSelectionModel() as RowSelectionModel;

            foreach (SelectedRow row in sm.SelectedRows)
            {
                StrArray   = GetDrugValue(row.RecordID.ToString());
                drg_code   = StrArray[0];
                drg_intake = StrArray[1];
                drg_freq   = StrArray[2];
                drg_medway = StrArray[3];
                if (DrugKind.Text == "L")
                {
                    sql += "INSERT INTO longterm_ordermgt(lgord_patic, lgord_dateord, lgord_timeord, lgord_usr1, lgord_dtactst, lgord_usr2, ";
                    sql += "lgord_drug, lgord_intake, lgord_freq, lgord_medway, lgord_actst) ";
                    sql += "VALUES('" + PationID.Text + "','" + toDay + "','" + toTime + "','" + DocName.Text + "','','" + DocName.Text + "',";
                    sql += "'" + drg_code + "','" + drg_intake + "','" + drg_freq + "','" + drg_medway + "','00001'); ";
                }
                else //==S
                {
                    sql += "INSERT INTO shortterm_ordermgt(shord_patic, shord_dateord, shord_timeord, shord_usr1, shord_dtactst, shord_usr2, ";
                    sql += "shord_drug, shord_intake, shord_freq, shord_medway, shord_actst) ";
                    sql += "VALUES('" + PationID.Text + "','" + toDay + "','" + toTime + "','" + DocName.Text + "','','" + DocName.Text + "',";
                    sql += "'" + drg_code + "','" + drg_intake + "','" + drg_freq + "','" + drg_medway + "','00001'); ";
                }
            }
            db.Excute(sql);

            Store istore = Grid_DrugTerm.GetStore();

            istore.RemoveAll();
            DetailsWindow.Close();

            //更新長期醫囑清單
            if (DrugKind.Text == "L")
            {
                sql  = "SELECT a.lgord_id,a.lgord_dateord,a.lgord_timeord,a.lgord_usr1,b.drg_name,a.lgord_intake,a.lgord_freq,a.lgord_medway,a.lgord_comment,a.lgord_dtactst ";
                sql += ", CASE a.lgord_actst WHEN '00001' THEN '' WHEN '00002' THEN '停用' END As Status ";
                sql += "FROM longterm_ordermgt a ";
                sql += "LEFT JOIN drug_list b ON a.lgord_drug=b.drg_code ";
                sql += "WHERE a.lgord_patic='" + PationID.Text + "' ";
                sql += "ORDER BY a.lgord_dateord DESC, Status";
                //sql += "  AND a.lgord_actst='00001'"; //只取使用中的藥物
                DataTable dt = db.Query(sql);
                GridStore1.DataSource = db.GetDataArray(dt);
                GridStore1.DataBind();
            }
            else //更新短期醫囑清單
            {
                sql  = "SELECT a.shord_id,a.shord_dateord,a.shord_timeord,a.shord_usr1,b.drg_name,a.shord_intake,a.shord_freq,a.shord_medway,a.shord_comment,a.shord_dtactst ";
                sql += ", CASE a.shord_actst WHEN '00001' THEN '' WHEN '00002' THEN '停用' END As Status ";
                sql += "FROM shortterm_ordermgt a ";
                sql += "LEFT JOIN drug_list b ON a.shord_drug = b.drg_code ";
                sql += "WHERE a.shord_patic='" + PationID.Text + "' ";
                //sql += "AND a.shord_dateord='" + toDay + "' ";
                sql += "ORDER BY a.shord_dateord DESC, Status";
                //sql += "AND a.shord_actst='00001'";//只取使用中
                DataTable dt = db.Query(sql);
                GridStore1.DataSource = db.GetDataArray(dt);
                GridStore1.DataBind();
            }
        }
Ejemplo n.º 19
0
 public Details()
 {
     DetailsWindow = new DetailsWindow();
     _open         = false;
 }
Ejemplo n.º 20
0
 public void Close()
 {
     DetailsWindow.Close();
     DetailsWindow = new DetailsWindow();
     _open         = false;
 }
        protected void EditDetails(object sender, DirectEventArgs e)
        {
            string json = "[" + e.ExtraParams["Values"] + "]";

            Dictionary <string, string>[] selRow = JSON.Deserialize <Dictionary <string, string>[]>(json);
            string person_id     = patient_id.Text;
            string dialysis_date = selRow[0]["dialysis_date"].ToString().Substring(0, 10);
            string dialysis_time = "";

            if (selRow[0]["dialysis_time"] != null)
            {
                dialysis_time = selRow[0]["dialysis_time"].ToString();
            }
            OldTime.Text = dialysis_time;

            string column_7 = selRow[0]["column_7"].ToString();
            string column_6 = selRow[0]["column_6"].ToString();
            string column_2 = "";

            if (selRow[0]["column_2"] != null)
            {
                column_2 = selRow[0]["column_2"].ToString();
            }
            string column_3 = "";

            if (selRow[0]["column_3"] != null)
            {
                column_3 = selRow[0]["column_3"].ToString();
            }
            string column_10 = selRow[0]["column_10"].ToString();
            string column_8  = selRow[0]["column_8"].ToString();
            string column_4  = selRow[0]["column_4"].ToString();
            string cln2_t    = "";

            if (selRow[0]["cln2_t"] != null)
            {
                cln2_t = selRow[0]["cln2_t"].ToString();
            }
            string cln2_p = "";

            if (selRow[0]["cln2_p"] != null)
            {
                cln2_p = selRow[0]["cln2_p"].ToString();
            }

            string cln2_r = "";

            if (selRow[0]["cln2_r"] != null)
            {
                cln2_r = selRow[0]["cln2_r"].ToString();
            }

            string cln2_bp = "";

            if (selRow[0]["cln2_bp"] != null)
            {
                cln2_bp = selRow[0]["cln2_bp"].ToString();
            }

            string cln2_rmk = "";

            if (selRow[0]["cln2_rmk"] != null)
            {
                cln2_rmk = selRow[0]["cln2_rmk"].ToString();
            }

            PationID.Text     = person_id;
            DialysisDate.Text = dialysis_date;
            DialysisTime.Text = dialysis_time;
            TextField1.Text   = column_7;
            TextField2.Text   = column_6;
            TextField3.Text   = column_2;
            TextField4.Text   = column_3;
            TextField5.Text   = column_10;
            TextField6.Text   = column_8;
            TextField7.Text   = column_4;
            TextField8.Text   = cln2_t;
            TextField9.Text   = cln2_p;
            TextField10.Text  = cln2_r;
            TextField11.Text  = cln2_bp;
            TextField12.Text  = cln2_rmk;
            DetailsWindow.Show();
        }
        protected void SaveDataList(object sender, DirectEventArgs e)
        {
            string PationID     = e.ExtraParams["PationID"];
            string DialysisDate = e.ExtraParams["DialysisDate"];
            string DialysisTime = e.ExtraParams["DialysisTime"];
            string sql1         = "";
            string sql0         = "SELECT dialysis_time, column_7, column_6, column_2, column_3, column_10, column_8, column_4 FROM data_list ";

            sql0 += "WHERE person_id='" + PationID + "' ";
            sql0 += "AND dialysis_date='" + DialysisDate + "' ";
            sql0 += "AND dialysis_time='" + OldTime.Text + "'";
            DataTable dt0 = db.Query(sql0);

            if (dt0.Rows.Count > 0)
            {
                sql1 += "UPDATE data_list SET ";
                sql1 += "dialysis_time='" + DialysisTime + "', ";
                sql1 += "column_7='" + TextField1.Text + "', ";
                sql1 += "column_6='" + TextField2.Text + "', ";
                sql1 += "column_2='" + TextField3.Text + "', ";
                sql1 += "column_3='" + TextField4.Text + "', ";
                sql1 += "column_10='" + TextField5.Text + "', ";
                sql1 += "column_8='" + TextField6.Text + "', ";
                sql1 += "column_4='" + TextField7.Text + "' ";
                sql1 += "WHERE person_id='" + PationID + "' ";
                sql1 += "AND dialysis_date='" + DialysisDate + "' ";
                sql1 += "AND dialysis_time='" + OldTime.Text + "'; ";
            }
            else
            {
                dt0.Clear();
                sql0  = "SELECT pv_floor, pv_bedno FROM pat_visit ";
                sql0 += "WHERE pv_ic='" + PationID + "' ";
                sql0 += "AND pv_datevisit='" + DialysisDate + "' ";
                dt0   = db.Query(sql0);
                string pv_floor = dt0.Rows[0]["pv_floor"].ToString();
                string pv_bedno = dt0.Rows[0]["pv_bedno"].ToString();

                sql1 += "INSERT INTO data_list ";
                sql1 += "(person_id, dialysis_date, dialysis_time, floor_no, bed_no, column_7, column_6, column_2, column_10, column_8, column_4) ";
                sql1 += "VALUES('" + PationID + "','" + DialysisDate + "','" + DialysisTime + "','" + pv_floor + "','" + pv_bedno + "','";
                sql1 += TextField1.Text + "','" + TextField2.Text + "','" + TextField3.Text + "','";
                sql1 += TextField4.Text + "','" + TextField5.Text + "','" + TextField6.Text + "'); ";
            }

            sql0  = "SELECT cln2_date, cln2_time, cln2_t, cln2_p, cln2_r, cln2_bp, cln2_rmk, cln2_user, cln2_dateadded FROM clinical2_nurse ";
            sql0 += "WHERE cln2_patic='" + PationID + "' ";
            sql0 += "AND cln2_date='" + DialysisDate + "' ";
            sql0 += "AND cln2_time='" + OldTime.Text + "'";
            dt0   = db.Query(sql0);
            if (dt0.Rows.Count > 0)
            {
                sql1 += "UPDATE clinical2_nurse SET ";
                sql1 += "cln2_time='" + DialysisTime + "', ";
                sql1 += "cln2_t='" + TextField8.Text + "', ";
                sql1 += "cln2_p='" + TextField9.Text + "', ";
                sql1 += "cln2_r='" + TextField10.Text + "', ";
                sql1 += "cln2_bp='" + TextField11.Text + "', ";
                sql1 += "cln2_rmk='" + TextField12.Text + "', ";
                sql1 += "cln2_user='******' ";
                sql1 += "WHERE cln2_patic='" + PationID + "' ";
                sql1 += "AND cln2_date='" + DialysisDate + "' ";
                sql1 += "AND cln2_time='" + OldTime.Text + "';";
            }
            else
            {
                sql1 += "INSERT INTO clinical2_nurse ";
                sql1 += "(cln2_patic, cln2_date, cln2_time, cln2_t, cln2_p, cln2_r, cln2_bp, cln2_rmk, cln2_user) ";
                sql1 += "VALUES('" + PationID + "','" + DialysisDate + "','" + DialysisTime + "','";
                sql1 += TextField8.Text + "','" + TextField9.Text + "','" + TextField10.Text + "','" + TextField11.Text + "','";
                sql1 += TextField12.Text + "','" + TextField13.Text + "')";
            }
            db.Excute(sql1);

            DetailsWindow.Hide();
            show_grid();
        }
Ejemplo n.º 23
0
        void clickItem(int idTransac)
        {
            DetailsWindow details = new DetailsWindow(idTransac);

            details.Show();
        }
Ejemplo n.º 24
0
 public LocationDetailsWindow()
 {
     view = new DetailsWindow();
 }
 public void setInfoBtn(DetailsWindow dw)
 {
     //InfoBtn.Tag = dw;
 }