private void button2_Click(object sender, EventArgs e)
        {
            lvwShow.Items.Clear();
            if ((dd.Where(p => p.DjiXing == cboDjiXing.Text).Count() == 0))
            {
                PromptingForm p = new PromptingForm("没有你要查找的数据!");
                p.ShowDialog();
                return;
            }


            foreach (var d in dd.Where(p => p.DjiXing == cboDjiXing.Text))
            {
                ListViewItem item = new ListViewItem(d.Dname + "");
                item.SubItems.Add(d.Dtype + "");
                item.SubItems.Add(d.DcostName + "");
                item.SubItems.Add(d.Dspec + "");
                item.SubItems.Add(d.DjiXing + "");
                item.SubItems.Add(d.DinsertPrice + "");
                item.SubItems.Add(d.DsellPrice + "");
                item.SubItems.Add(d.Dstock + "");
                item.SubItems.Add(d.DstockMax + "");
                item.SubItems.Add(d.DstockMin + "");
                item.SubItems.Add(d.DeffectTime + "");
                item.SubItems.Add(d.DproductTime + "");
                item.SubItems.Add(d.Efficay + "");
                lvwShow.Items.Add(item);
            }
        }
        private void button1_Click_1(object sender, EventArgs e)
        {
            if (textBox1.Text == "")
            {
                PromptingForm p = new PromptingForm("请输入类型、");
                p.ShowDialog();
                return;
            }
            string str = "";

            foreach (Control item in Controls)
            {
                if (item is GroupBox)
                {
                    foreach (Control ite in item.Controls)
                    {
                        if (ite is CheckBox)
                        {
                            if (((CheckBox)ite).Checked)
                            {
                                str += ite.Text + "-";
                            }
                        }
                    }
                }
            }

            string s = new IdCard_BLL().p_usersType_insert(textBox1.Text, str);

            MessageBox.Show(str);
            PromptingForm pp = new PromptingForm(str);

            pp.ShowDialog();
            this.Close();
        }
Beispiel #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            string str = "";

            foreach (Control item in Controls)
            {
                if (item is GroupBox)
                {
                    foreach (Control ite in item.Controls)
                    {
                        if (ite is CheckBox)
                        {
                            if (((CheckBox)ite).Checked)
                            {
                                str += ite.Text + "-";
                            }
                        }
                    }
                }
            }
            if (textBox1.Text != "")
            {
                PromptingForm pp = new PromptingForm("保存成功!");
                pp.ShowDialog();
                quanxian_Form_Load(null, null);
            }
            else if (textBox3.Text != "")
            {
                PromptingForm pp = new PromptingForm("保存成功!");

                pp.ShowDialog();
                quanxian_Form_Load(null, null);
            }
        }
Beispiel #4
0
        private void button1_Click(object sender, EventArgs e)
        {
            foreach (Control item in groupBox1.Controls)
            {
                if ((item is TextBox || item is ComboBox) && item.Text == "")
                {
                    PromptingForm prom = new PromptingForm("请把信息填完整!");
                    prom.ShowDialog();
                    return;
                }
            }
            zhuyuan zhu = new zhuyuan();

            zhu.kId        = int.Parse(txtKId.Text);
            zhu.Idsickroom = int.Parse(cbobingfang.Text);
            zhu.Sid        = cboKebie.SelectedIndex;
            zhu.BedNo      = cbobingchuang.Text;
            zhu.Imprest    = int.Parse(txtyujiaofei.Text);
            zhu.Bewrite    = txtmiaoshu.Text;
            zhu.Tabu       = txtjinji.Text;
            zhu.Ztime      = DateTime.Now + "";
            string        str = new IdCard_BLL().p_zhuyuan_insert(zhu);
            PromptingForm p   = new PromptingForm(str);

            p.ShowDialog();
        }
Beispiel #5
0
        private void  除病房ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (listView1.SelectedItems.Count == 0)
            {
                PromptingForm p = new PromptingForm("请选择要删除的病房");
                p.ShowDialog();
                return;
            }
            int num = 0;

            List <sickroom> sic = new List <sickroom>();

            for (int i = 0; i < listView1.Items.Count; i++)
            {
                //判断此行是否被选中
                if (listView1.Items[i].Selected)
                {
                    num++;
                    sickroom s = new sickroom();
                    s.Idsickroom = int.Parse(listView1.Items[i].SubItems[0].Text + "");
                    sic.Add(s);
                }
            }
            string str = new IdCard_BLL().Delete(sic);

            if (str == "1")
            {
                PromptingForm prom = new PromptingForm("删除 " + num + "个病房成功");
                InHospitalForm_Load(null, null);
                listView2.Items.Clear();
                prom.ShowDialog();
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if (textBox5.Text == "")
            {
                return;
            }
            if (int.Parse(textBox5.Text) - int.Parse(textBox2.Text) >= 0)
            {
                new IdCard_BLL().p_zhuyuanzhuyuanxiaofei_deleted(txtId.Text);
                zhuayuantongji zhu = new zhuayuantongji();
                zhu.Kid    = (txtId.Text);
                zhu.Sname  = txtkeshi.Text;
                zhu.time   = DateTime.Now + "";
                zhu.ymoney = int.Parse(textBox3.Text);

                zhu.zmoney = int.Parse(txtyiyong.Text);
                new IdCard_BLL().p_zhuayuantongji_select(zhu);

                new IdCard_BLL().p_bed_update(int.Parse(textBox4.Text), int.Parse(textBox4.Tag + ""));
                PromptingForm p = new PromptingForm("出院成功!祝: 你身体健康!");
                p.ShowDialog();
                InHospital_over_Load(null, null);
                foreach (Control item in groupBox5.Controls)
                {
                    if (item is TextBox)
                    {
                        item.Text = "";
                    }
                }
                lvwselect.Items.Clear();
            }
        }
Beispiel #7
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (txtDname.Text == "")
            {
                PromptingForm p = new PromptingForm("请选择需要修改的数据 !");
                p.ShowDialog();
                return;
            }
            Drug_insert Dupdate = new Drug_insert();

            Dupdate.Dname        = txtDname.Text;
            Dupdate.Dtype        = cboDtype.Text;
            Dupdate.DcostName    = cboDcostName.Text;
            Dupdate.Dspec        = cboDspec.Text;
            Dupdate.DjiXing      = cboDjiXing.Text;
            Dupdate.DinsertPrice = int.Parse(txtDinsertPrice.Text);
            Dupdate.DsellPrice   = int.Parse(txtDsellPrice.Text);
            Dupdate.Dstock       = int.Parse(txtDstock.Text);
            Dupdate.DstockMax    = int.Parse(txtDstockMax.Text);
            Dupdate.DstockMin    = int.Parse(txtDstockMin.Text);
            Dupdate.DeffectTime  = dtpDproductTime.Text;
            Dupdate.DproductTime = dtpDeffectTime.Text;
            Dupdate.Efficay      = txtEfficay.Text;
            string mes = new Drug_insert_BLL().Update(Dupdate);

            button3_Click(null, null);
            PromptingForm pp = new PromptingForm(mes);

            pp.ShowDialog();
        }
Beispiel #8
0
        private void lvwSelect_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            yy();

            ListViewItem no = lvwSelect.SelectedItems[0];
            string       s  = no.SubItems[1].Text;

            foreach (ListViewItem ite in lvwYaofang.Items)
            {
                if (s == ite.SubItems[1].Text)
                {
                    PromptingForm p = new PromptingForm("已经添加了该药品 !");
                    p.ShowDialog();
                    return;
                }
            }
            ListViewItem item = new ListViewItem(lvwYaofang.Items.Count + 1 + "");

            item.SubItems.Add(no.SubItems[1].Text);
            item.SubItems.Add(no.SubItems[2].Text);
            item.SubItems.Add(no.SubItems[3].Text);
            item.SubItems.Add(no.SubItems[4].Text);
            item.SubItems.Add(no.SubItems[5].Text);
            lvwYaofang.Items.Add(item);
        }
        private void btnSelect_Click(object sender, EventArgs e)
        {
            if (txtDname.Text == "")
            {
                PromptingForm p = new PromptingForm("请输入药品名字!");
                p.ShowDialog();
                return;
            }
            lvwShow.Items.Clear();
            List <Drug_insert> di = new Drug_insert_BLL().SelectAll(txtDname.Text);

            if (di.Count == 0)
            {
                PromptingForm p = new PromptingForm("没有你要查找的数据!");
                p.ShowDialog();
                return;
            }
            for (int i = 0; i < di.Count; i++)
            {
                ListViewItem item = new ListViewItem(di[i].Dname + "");
                item.SubItems.Add(di[i].Dtype + "");
                item.SubItems.Add(di[i].DcostName + "");
                item.SubItems.Add(di[i].Dspec + "");
                item.SubItems.Add(di[i].DjiXing + "");
                item.SubItems.Add(di[i].DinsertPrice + "");
                item.SubItems.Add(di[i].DsellPrice + "");
                item.SubItems.Add(di[i].Dstock + "");
                item.SubItems.Add(di[i].DstockMax + "");
                item.SubItems.Add(di[i].DstockMin + "");
                item.SubItems.Add(di[i].DeffectTime + "");
                item.SubItems.Add(di[i].DproductTime + "");
                item.SubItems.Add(di[i].Efficay + "");
                lvwShow.Items.Add(item);
            }
        }
 private void button3_Click(object sender, EventArgs e)
 {
     if (textBox4.Text == "")
     {
         PromptingForm p = new PromptingForm("请输入病房号!");
         p.ShowDialog();
         return;
     }
     lvwzhuyuan.Items.Clear();
     if (zhu.Where(p => (p.Idsickroom + "") == textBox4.Text).Count() == 0)
     {
         PromptingForm p = new PromptingForm("没有数据");
         p.ShowDialog();
         return;
     }
     foreach (var z in zhu.Where(p => (p.Idsickroom + "") == textBox4.Text))
     {
         ListViewItem item = new ListViewItem(z.kId + "");
         item.SubItems.Add(z.Kname);
         item.SubItems.Add(se[z.Sid].Sname);
         item.SubItems.Add(z.Idsickroom + "");
         item.SubItems.Add(z.BedNo);
         item.SubItems.Add(z.Imprest + "");
         item.SubItems.Add(z.Bewrite);
         item.SubItems.Add(z.Tabu);
         item.SubItems.Add(z.Ztime);
         lvwzhuyuan.Items.Add(item);
     }
 }
        private void button1_Click(object sender, EventArgs e)
        {
            List <zhuyuan>     zhu = new IdCard_BLL().p_zhuyuan_Select();
            List <SectionRoom> se  = new UsersBLL().Section();

            txtID2.Text     = "";
            txtmingzi2.Text = "";
            txtyujiao2.Text = "";
            foreach (Control item in groupBox4.Controls)
            {
                if (item is TextBox)
                {
                    item.Text = "";
                }
            }
            foreach (Control item in groupBox3.Controls)
            {
                item.Enabled = false;
            }
            try
            {
                if (textBox1.Text == "")
                {
                    PromptingForm p = new PromptingForm("请输入卡号!");
                    p.ShowDialog();
                    return;
                }
                if (zhu.Where(p => p.kId == int.Parse(textBox1.Text)).Count() == 0)
                {
                    PromptingForm p = new PromptingForm("没有数据!");
                    p.ShowDialog();
                    return;
                }
                foreach (var z in zhu.Where(p => p.kId == int.Parse(textBox1.Text)))
                {
                    txtId.Text     = z.kId + "";
                    txtmingzi.Text = z.Kname;
                    txtkeshi.Text  = (se[z.Sid].Sname);
                    txttime.Text   = (z.Ztime + "");
                    txtyujiao.Text = (z.Imprest + "");
                }
                List <zhuyuanxiaofei> xfs = new IdCard_BLL().p_zhuyuanxiaofei_select(int.Parse(txtId.Text));
                int i = 0;
                foreach (zhuyuanxiaofei xf in xfs)
                {
                    List <Drug_insert> di = new Drug_insert_BLL().SelectAll(xf.yaoName);
                    i = i + int.Parse(xf.yaonum + "") * int.Parse(di[0].DsellPrice + "");
                }
                txtyiyong.Text  = i + "";
                txtshengyu.Text = int.Parse(txtyujiao.Text) - int.Parse(txtyiyong.Text) + "";
            }
            catch
            {
                PromptingForm p = new PromptingForm("病人编号只能是数字!");
                p.ShowDialog();
            }
        }
Beispiel #12
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (txtRid.Text == "")
            {
                PromptingForm pf = new PromptingForm("没有要结账病人信息!");
                pf.ShowDialog();
                return;
            }
            if (textBox6.Text == "")
            {
                PromptingForm pm = new PromptingForm("付款金额不足!");
                pm.ShowDialog();
                return;
            }
            if (int.Parse(textBox6.Text) < 0)
            {
                PromptingForm pm = new PromptingForm("付款金额不足!");
                pm.ShowDialog();
                return;
            }
            prom_Form p = new prom_Form("确定结账", this);

            p.ShowDialog();
            if (this.Tag + "" == "OK")
            {
                new IdCard_BLL().p_kaiyao_update(txtRid.Text);
                PromptingForm pp = new PromptingForm("结账成功!请到药房取药!");
                pp.ShowDialog();



                zhuayuantongji zhu = new zhuayuantongji();
                zhu.Kid    = (txtRid.Text);
                zhu.Sname  = cboroom.Text;
                zhu.time   = DateTime.Now + "";
                zhu.ymoney = int.Parse(textBox4.Text);
                zhu.zmoney = 0;
                new IdCard_BLL().p_zhuayuantongji_select(zhu);



                maidanForm_Load(null, null);
                foreach (Control item in groupBox3.Controls)
                {
                    if (item is TextBox || item is ComboBox)
                    {
                        item.Text = "";
                    }
                }
                listView2.Items.Clear();
            }

            //*************************************************
        }
Beispiel #13
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (listView2.SelectedItems.Count > 0)
     {
         string str = listView2.Items[listView2.SelectedItems[0].Index].Text;
         new IdCard_BLL().p_kaiyaoregister_delete(str);
         listView2.Items.RemoveAt(listView2.SelectedItems[0].Index);
         PromptingForm p = new PromptingForm("药品发药成功");
         p.ShowDialog();
     }
 }
Beispiel #14
0
        private void btnReg_Click(object sender, EventArgs e)
        {
            foreach (Control item in this.Controls)
            {
                if (item is TextBox || item is ComboBox)
                {
                    if (item.Text == "")
                    {
                        PromptingForm p = new PromptingForm("请把信息填写完整!");
                        p.ShowDialog();
                        return;
                    }
                }
            }


            IdCard IC = new IdCard();

            IC.Name = txtName.Text;
            if (rdoBoy.Checked)
            {
                IC.Sex = rdoBoy.Text;
            }
            else
            {
                IC.Sex = rdoGirl.Text;
            }
            IC.Age      = int.Parse(txtAge.Text);
            IC.Birthday = dtpBrithday.Text;
            IC.Address  = txtAddress.Text;
            IC.Phone    = (txtPhone.Text);
            IC.Nation   = cboNation.Text;
            IC.Cultrue  = cboCultrue.Text;
            if (rdoMarriageYes.Checked)
            {
                IC.Marriage = rdoMarriageYes.Text;
            }
            else
            {
                IC.Marriage = rdoMarriageNo.Text;
            }
            IC.Work     = cboWork.Text;
            IC.Postcode = (txtPostcode.Text);
            IC.IdcardNo = txtIdcardNo.Text;

            string mes = new IdCard_BLL().Reg(IC);


            string s = new IdCard_BLL().p_IdCard_select();

            PromptingForm pp = new PromptingForm("注册成功!卡号为:" + s);

            pp.ShowDialog();
        }
Beispiel #15
0
        private void button1_Click(object sender, EventArgs e)
        {
            foreach (Control item in groupBox1.Controls)
            {
                if (comboBox1.Text != "医师" && (item.Name == "textBox9" || item.Name == "comboBox2"))
                {
                    textBox9.Text = 0 + "";
                    continue;
                }
                else if (item.Text == "")
                {
                    PromptingForm p = new PromptingForm("请输入完整");
                    p.ShowDialog();
                    return;
                }
            }
            try
            {
                int.Parse(textBox9.Text);
            }
            catch
            {
                PromptingForm pp = new PromptingForm("请正确输入挂号费");
                pp.ShowDialog();
            }
            Users u = new Users();

            u.Uname = textBox1.Text;
            u.name  = textBox4.Text;
            u.Pwd   = textBox2.Text;
            if (radioButton1.Checked)
            {
                u.Sex = "男";
            }
            else
            {
                u.Sex = "女";
            }
            u.Address     = textBox5.Text;
            u.Phone       = textBox6.Text;
            u.Spell       = textBox7.Text;
            u.Type        = comboBox1.Text;
            u.SectionRoom = comboBox2.Text;
            u.money       = int.Parse(textBox9.Text);
            u.Peodom      = "";
            string        s  = new IdCard_BLL().p_users_insert(u);
            PromptingForm ps = new PromptingForm(s);

            ps.ShowDialog();
        }
Beispiel #16
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (lvwYaofang.SelectedItems.Count == 0)
            {
                PromptingForm p = new PromptingForm("请选中要删除的药品 !");
                p.ShowDialog();
                return;
            }

            int deleteNo = int.Parse(lvwYaofang.SelectedItems[0].Text);

            lvwYaofang.Items.RemoveAt(deleteNo - 1);
            yy();
        }
Beispiel #17
0
        private void btnInsert_Click(object sender, EventArgs e)
        {
            foreach (Control item in groupBox1.Controls)
            {
                if (item is TextBox)
                {
                    if (item.Text == "")
                    {
                        PromptingForm p = new PromptingForm("请把信息填写完整 !");
                        p.ShowDialog();
                        return;
                    }
                }
                if (item is ComboBox)
                {
                    if (item.Text == "")
                    {
                        PromptingForm p = new PromptingForm("请把信息填写完整 !");
                        p.ShowDialog();

                        return;
                    }
                }
            }

            Drug_insert Dinsert = new Drug_insert();

            Dinsert.Dname        = txtDname.Text;
            Dinsert.Dtype        = cboDtype.Text;
            Dinsert.DcostName    = cboDcostName.Text;
            Dinsert.Dspec        = cboDspec.Text;
            Dinsert.DjiXing      = cboDjiXing.Text;
            Dinsert.DinsertPrice = int.Parse(txtDinsertPrice.Text);
            Dinsert.DsellPrice   = int.Parse(txtDsellPrice.Text);
            Dinsert.Dstock       = int.Parse(txtDstock.Text);
            Dinsert.DstockMax    = int.Parse(txtDstockMax.Text);
            Dinsert.DstockMin    = int.Parse(txtDstockMin.Text);
            Dinsert.DeffectTime  = dtpDproductTime.Text;
            Dinsert.DproductTime = dtpDeffectTime.Text;
            Dinsert.Efficay      = txtEfficay.Text;

            string mes = new Drug_insert_BLL().Insert(Dinsert);

            txtDname.Text = "";
            btnSelect_Click(null, null);
            PromptingForm pp = new PromptingForm(mes);

            pp.ShowDialog();
        }
 private void button4_Click(object sender, EventArgs e)
 {
     try
     {
         int i = int.Parse(txtyujiao.Text) + int.Parse(txtyujiao2.Text);
         new IdCard_BLL().update_zhuyuan_yujiao(i, txtID2.Text);
         PromptingForm p = new PromptingForm("交款成功!");
         p.ShowDialog();
     }
     catch
     {
         PromptingForm p = new PromptingForm("请输入正确金额!");
         p.ShowDialog();
     }
 }
Beispiel #19
0
        private void btnReg_Click(object sender, EventArgs e)
        {
            foreach (Control item in groupBox1.Controls)
            {
                if (item is Label)
                {
                    continue;
                }
                else
                {
                    if (item.Text == "")
                    {
                        PromptingForm p = new PromptingForm("请填写完整信息");
                        p.ShowDialog();
                        return;
                    }
                }
            }
            Register r = new Register();

            r.Rid           = txtRid.Text;
            r.KId           = int.Parse(txtKid.Text);
            r.IdType        = cboIdType.Text;
            r.SectionRoom   = cboSectionRoom.Text + "";
            r.Doctor        = cboDoctor.Text;
            r.GuaDanFei     = int.Parse(txtGuaHaoFei.Text);
            r.OtherFei      = int.Parse(txtOtherFei.Text);
            r.ReristerTime  = dtpReristerTime.Text;
            r.SeeDoctorTime = dtpSeeDoctorTime.Text;
            string        s    = new UsersBLL().RegisterRew(r);
            PromptingForm prom = new PromptingForm(s);

            prom.ShowDialog();
            if (cheguadan.Checked && s == "挂号成功")
            {
                printPreviewDialog1.Document = printDocument1;
                printPreviewDialog1.Document.DefaultPageSettings.PaperSize = new PaperSize()
                {
                    Height = 600, Width = 500
                };
                printPreviewDialog1.ShowIcon = false;
                printPreviewDialog1.Width    = 400;
                printPreviewDialog1.Height   = 400;
                printPreviewDialog1.Top      = 15;
                printPreviewDialog1.Left     = 10;
                printPreviewDialog1.ShowDialog();
            }
        }
Beispiel #20
0
 private void  除类型ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (listView2.SelectedItems.Count > 0)
     {
         string str = listView2.SelectedItems[0].Text;
         new IdCard_BLL().p_usesType_delete(str);
         PromptingForm p = new PromptingForm("删除成功!");
         p.ShowDialog();
         quanxian_Form_Load(null, null);
     }
     else
     {
         PromptingForm p = new PromptingForm("没有选中要删除的数据");
         p.ShowDialog();
     }
 }
Beispiel #21
0
 private void textBox5_TextChanged(object sender, EventArgs e)
 {
     try
     {
         if (textBox5.Text == "")
         {
             textBox6.Text = "";
             return;
         }
         textBox6.Text = int.Parse(textBox5.Text) - int.Parse(textBox4.Text) + "";
     }
     catch {
         PromptingForm p = new PromptingForm("请正确输入金钱!");
         p.ShowDialog();
     }
 }
Beispiel #22
0
 private void btnReg_Click(object sender, EventArgs e)
 {
     foreach (Control item in groupBox1.Controls)
     {
         if (item is Label)
         {
             continue;
         }
         else
         {
             if (item.Text == "")
             {
                 PromptingForm p = new PromptingForm("请填写完整信息");
                 p.ShowDialog();
                 return;
             }
         }
     }
 }
        private void button6_Click(object sender, EventArgs e)
        {
            if (txtDsellPrice.Text == "")
            {
                PromptingForm p = new PromptingForm("请输入价钱!");
                p.ShowDialog();
                return;
            }

            lvwShow.Items.Clear();
            try
            {
                if (dd.Where(p => p.DsellPrice == int.Parse(txtDsellPrice.Text)).Count() == 0)
                {
                    PromptingForm p = new PromptingForm("没有数据!");
                    p.ShowDialog();
                }

                foreach (var d in dd.Where(p => p.DsellPrice == int.Parse(txtDsellPrice.Text)))
                {
                    ListViewItem item = new ListViewItem(d.Dname + "");
                    item.SubItems.Add(d.Dtype + "");
                    item.SubItems.Add(d.DcostName + "");
                    item.SubItems.Add(d.Dspec + "");
                    item.SubItems.Add(d.DjiXing + "");
                    item.SubItems.Add(d.DinsertPrice + "");
                    item.SubItems.Add(d.DsellPrice + "");
                    item.SubItems.Add(d.Dstock + "");
                    item.SubItems.Add(d.DstockMax + "");
                    item.SubItems.Add(d.DstockMin + "");
                    item.SubItems.Add(d.DeffectTime + "");
                    item.SubItems.Add(d.DproductTime + "");
                    item.SubItems.Add(d.Efficay + "");
                    lvwShow.Items.Add(item);
                }
            }
            catch
            {
                PromptingForm p = new PromptingForm("请输入正确价钱!");
                p.ShowDialog();
            }
        }
        private void button2_Click(object sender, EventArgs e)
        {
            SectionRoom s = new SectionRoom();

            if (listView1.SelectedItems.Count > 0)
            {
                int i = listView1.SelectedItems[0].Index;
                s.Sname = listView1.Items[i].Text + "";
                new SectionRoomBLL().Delete(s);
            }
            listView1.Items.Clear();
            SectionRoomDelete_Load(null, null);

            PromptingForm p = new PromptingForm("删除成功");

            p.ShowDialog();
            txtSname.Text  = "";
            txtSaddr.Text  = "";
            txtSprice.Text = "";
        }
Beispiel #25
0
        private void button1_Click(object sender, EventArgs e)
        {
            string str = "";

            foreach (Control item in Controls)
            {
                if (item is GroupBox)
                {
                    foreach (Control ite in item.Controls)
                    {
                        if (ite is CheckBox)
                        {
                            if (((CheckBox)ite).Checked)
                            {
                                str += ite.Text + "-";
                            }
                        }
                    }
                }
            }
            if (textBox1.Text != "")
            {
                new IdCard_BLL().p_usesType_update(textBox1.Text, str);
                type = new IdCard_BLL().p_usesType_select();
                PromptingForm pp = new PromptingForm("保存成功!");
                pp.ShowDialog();
                quanxian_Form_Load(null, null);
            }
            else if (textBox3.Text != "")
            {
                new IdCard_BLL().p_usersPeodom_update(textBox3.Text, str);
                type = new IdCard_BLL().p_usesType_select();
                PromptingForm pp = new PromptingForm("保存成功!");

                pp.ShowDialog();
                quanxian_Form_Load(null, null);
            }
        }
Beispiel #26
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (txtDname.Text == "" && lvwShow.SelectedItems.Count == 0)
            {
                PromptingForm p = new PromptingForm("请选择需要删除的数据 !");
                p.ShowDialog();
                return;
            }

            Drug_insert Ddelete = new Drug_insert();

            Ddelete.Dname = txtDname.Text;
            DialogResult dr = MessageBox.Show("确定要删除吗?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

            if (dr == DialogResult.Yes)
            {
                string mes = new Drug_insert_BLL().Delete(Ddelete);
                txtDname.Text = "";
                comboBox1_SelectedIndexChanged(null, null);
                PromptingForm p = new PromptingForm(mes);
                p.ShowDialog();
            }
        }
 private void button2_Click(object sender, EventArgs e)
 {
     lvwzhuyuan.Items.Clear();
     if (zhu.Where(p => p.Sid == comboBox1.SelectedIndex).Count() == 0)
     {
         PromptingForm p = new PromptingForm("没有数据!");
         p.ShowDialog();
         return;
     }
     foreach (var z in zhu.Where(p => p.Sid == comboBox1.SelectedIndex))
     {
         ListViewItem item = new ListViewItem(z.kId + "");
         item.SubItems.Add(z.Kname);
         item.SubItems.Add(se[z.Sid].Sname);
         item.SubItems.Add(z.Idsickroom + "");
         item.SubItems.Add(z.BedNo);
         item.SubItems.Add(z.Imprest + "");
         item.SubItems.Add(z.Bewrite);
         item.SubItems.Add(z.Tabu);
         item.SubItems.Add(z.Ztime);
         lvwzhuyuan.Items.Add(item);
     }
 }
Beispiel #28
0
        private void button5_Click_1(object sender, EventArgs e)
        {
            if (textBox15.Text == "0")
            {
                PromptingForm pm = new PromptingForm("增加的数量不能为0!");
                pm.ShowDialog();
                return;
            }
            if (lvwselect.Visible)
            {
                if (lvwselect.SelectedItems.Count > 0)
                {
                    int i = lvwselect.SelectedItems[0].Index;
                    lvwselect.Items[i].SubItems[3].Text = int.Parse(lvwselect.Items[i].SubItems[3].Text) + int.Parse(textBox15.Text) + "";
                    button9_Click(null, null);

                    PromptingForm p = new PromptingForm("添加成功!");
                    p.ShowDialog();
                    textBox15.Text = "0";
                    return;
                }
            }
            foreach (ListViewItem item in lvwselect.Items)
            {
                if (item.SubItems[0].Text == textBox11.Text)
                {
                    item.SubItems[3].Text = int.Parse(item.SubItems[3].Text) + int.Parse(textBox15.Text) + "";
                    lvwselect.Visible     = true;
                    txtyaoping.Enabled    = false;
                    btninsert.Text        = "新单";
                    num            = 0;
                    textBox15.Text = "0";
                    button9_Click(null, null);

                    PromptingForm p = new PromptingForm("添加成功!");
                    p.ShowDialog();
                    textBox15.Text = "0";
                    return;
                }
            }
            if (lvwxin.SelectedItems.Count > 0)
            {
                ListViewItem item    = lvwxin.SelectedItems[0];
                ListViewItem newitem = new ListViewItem(item.SubItems [0].Text);
                newitem.SubItems.Add(item.SubItems[1].Text);
                newitem.SubItems.Add(item.SubItems[2].Text);
                newitem.SubItems.Add(textBox15.Text);
                newitem.SubItems.Add(item.SubItems[3].Text);

                newitem.SubItems.Add(item.SubItems[4].Text);
                newitem.SubItems.Add(item.SubItems[5].Text);
                newitem.SubItems.Add(item.SubItems[6].Text);
                newitem.SubItems.Add(item.SubItems[7].Text);
                lvwselect.Items.Add(newitem);

                lvwselect.Visible  = true;
                txtyaoping.Enabled = false;
                btninsert.Text     = "新单";
                num            = 0;
                textBox15.Text = "0";
                button9_Click(null, null);
                PromptingForm p = new PromptingForm("添加成功!");
                p.ShowDialog();
                textBox15.Text = "0";
                return;
            }
            PromptingForm pp = new PromptingForm("没有添加信息!");

            pp.ShowDialog();
        }
Beispiel #29
0
        private void button1_Click(object sender, EventArgs e)
        {
            foreach (Control item in groupBox1.Controls)
            {
                if (checkBox1.Checked)
                {
                    if (item.Text == "" && item.Name != "txtnum")
                    {
                        PromptingForm frmPrompting = new PromptingForm("请输入完整!");
                        frmPrompting.ShowDialog();
                        return;
                    }
                }
                else
                {
                    if (item.Name == "txtlou1" || item.Name == "txtlou2" || item.Name == "txtfang1" || item.Name == "txtfang2")
                    {
                        break;
                    }
                    if (item.Text == "")
                    {
                        PromptingForm frmPrompting = new PromptingForm("请输入完整!");
                        frmPrompting.ShowDialog();
                        return;
                    }
                }
            }


            List <sickroom> sics = new List <sickroom>();//要添加的病房放到sics集合中

            if (checkBox1.Checked)
            {
                for (int i = int.Parse(txtlou1.Text); i <= int.Parse(txtlou2.Text); i++)
                {
                    for (int j = int.Parse(txtfang1.Text); j <= int.Parse(txtfang2.Text); j++)
                    {
                        sickroom sic = new sickroom();
                        if (j > 9)
                        {
                            sic.Idsickroom = int.Parse("" + i + j);
                        }
                        else
                        {
                            sic.Idsickroom = int.Parse("" + i + 0 + j);
                        }
                        sic.Sid   = cboKeshi.SelectedIndex;
                        sic.Tyep  = cboType.Text;
                        sic.Price = int.Parse(txtPrice.Text);
                        sics.Add(sic);
                    }
                }
            }
            else
            {
                sickroom sic = new sickroom();
                sic.Idsickroom = int.Parse(txtnum.Text);
                sic.Sid        = cboKeshi.SelectedIndex;
                sic.Tyep       = cboType.Text;
                sic.Price      = int.Parse(txtPrice.Text);
                sics.Add(sic);
            }
            int           num  = int.Parse(txtBFnum.Text);
            string        str  = new IdCard_BLL().sickroom(sics, num);
            PromptingForm prop = new PromptingForm(str);

            prop.ShowDialog();
        }