private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            Patient patient = (Patient)PatientsList.SelectedItem;

            this.patient = patient;
            if (patient is null)
            {
                TextFirstName.Clear();
                TextLastName.Clear();
                DatePickerBirth.SelectedDate = DateTime.Now;
                TextAddress.Clear();
                TextInsuranceNumber.Clear();
            }
            else
            {
                TextFirstName.Text           = patient.FirstName;
                TextLastName.Text            = patient.LastName;
                DatePickerBirth.SelectedDate = patient.dateOfBirth;
                TextAddress.Text             = patient.Address;
                TextInsuranceNumber.Text     = UserInputControl.InsuranceNumToString(patient.InsuranceNumber);
            }
            TextSymptoms.Clear();
        }
Esempio n. 2
0
 public int GetWordExtent(IVsTextLayer pTextLayer, TextAddress ta, WORDEXTFLAGS flags, TextSpan[] pts)
 {
     return(VSConstants.E_NOTIMPL);
 }
Esempio n. 3
0
 public int GetPairExtent(IVsTextLayer pTextLayer, TextAddress ta, TextSpan[] pts)
 {
     return(VSConstants.E_NOTIMPL);
 }
 public int GetWordExtent(IVsTextLayer pTextLayer, TextAddress ta, WORDEXTFLAGS flags, TextSpan[] pts)
 {
     return FAILED;
 }
Esempio n. 5
0
        private void ButRepair_Click(object sender, EventArgs e)
        {
            try
            {
                // 1.验证输入内容是否有效
                if (TextAddress.Text.Trim().Equals(""))
                {
                    MessageBox.Show("报修地点不能为空", "提示");
                    TextAddress.Focus();
                    return;
                }
                else if (TextContent.Text.Trim().Equals(""))
                {
                    MessageBox.Show("报修内容不能为空", "提示");
                    TextContent.Focus();
                    return;
                }
                else if (ComType.SelectedIndex == -1)
                {
                    MessageBox.Show("请选择报修类型", "提示");
                    ComType.Focus();
                    return;
                }
                // 验证数据库中是否已经有相同的报修
                string  id     = "select userId from user_info where userName = '******'";
                DataSet user   = DBconn.getData(id);
                string  sqlStr = "select repairId,repairCount from repairtable where userId = '" + user.Tables[0].Rows[0][0] + "'";


                DataSet ds = DBconn.getData(sqlStr);
                //如果ds里面不存在数据,说明这个用户第一次报修,直接插入新的记录
                if (ds.Tables[0].Rows.Count == 0)
                {
                    string sqlInsert = "insert into repairtable(userId,repairContent,repairDate," +
                                       "repairStatus,repairAddress,repairType,repairCount)values('" + user.Tables[0].Rows[0][0] + "','" + TextContent.Text + "','" + DateRepair.Value + "','" + "待维修" + "','" + TextAddress.Text + "','" + ComType.Text + "','" + 1 + "')";
                    DBconn.upData(sqlInsert);
                    MessageBox.Show("报修成功!");
                    ClearAll();
                }
                else
                {
                    //否则的话就是repairtable表里已经有了LanUser里的这个用户。目的就是更新这个用户的报修次数,并插入新的记录
                    int    count     = ds.Tables[0].Rows.Count;
                    string sqlInsert = "insert into repairtable(userId,repairContent,repairDate," +
                                       "repairStatus,repairAddress,repairType,repairCount)values('" + user.Tables[0].Rows[0][0] + "','" + TextContent.Text + "','" + DateRepair.Value + "','" + "待维修" + "','" + TextAddress.Text + "','" + ComType.Text + "','" + (count + 1) + "')";
                    DBconn.upData(sqlInsert);
                    MessageBox.Show("报修成功!");
                    ClearAll();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("报修出错:" + ex.Message);
                TextContent.Focus();
            }
            finally
            {
                // 最后关闭数据库
                DBconn.conn.Close();
            }
        }
 public int GetWordExtent(IVsTextLayer textLayer, TextAddress ta, WORDEXTFLAGS flags, TextSpan[] textSpan)
 => VSConstants.E_NOTIMPL;
 public int GetWordExtent(IVsTextLayer pTextLayer, TextAddress ta, WORDEXTFLAGS flags, TextSpan[] pts)
 {
     return(failed);
 }
Esempio n. 8
0
 public virtual int GetPairExtent(IVsTextLayer textLayer, TextAddress textAddress, TextSpan[] span) => VSConstants.E_NOTIMPL;
Esempio n. 9
0
 public virtual int GetPairExtent(IVsTextLayer textLayer, TextAddress textAddress, TextSpan[] span) {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 10
0
 int IVsLanguageTextOps.GetWordExtent(IVsTextLayer pTextLayer, TextAddress ta, WORDEXTFLAGS flags, TextSpan[] pts)
 {
     return(VSConstants.E_NOTIMPL);
 }
Esempio n. 11
0
 int IVsLanguageTextOps.GetPairExtent(IVsTextLayer pTextLayer, TextAddress ta, TextSpan[] pts)
 {
     return(VSConstants.E_NOTIMPL);
 }
 public int GetWordExtent(IVsTextLayer pTextLayer, TextAddress ta, WORDEXTFLAGS flags, TextSpan[] pts)
 {
     return VSConstants.E_NOTIMPL;
 }
 public int GetPairExtent(IVsTextLayer pTextLayer, TextAddress ta, TextSpan[] pts)
 {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 14
0
 public virtual int GetWordExtent(IVsTextLayer textLayer, TextAddress textAddress, WORDEXTFLAGS flags, TextSpan[] span)
 {
     return(VSConstants.E_NOTIMPL);
 }
Esempio n. 15
0
 /// <summary>
 /// To return the buffer address of the given text address. No need to implement
 /// </summary>
 /// <param name="ta">contains the TextAddress</param>
 /// <param name="piOffset">will contain the ofset from the start of the buffer</param>
 /// <returns></returns>
 int IVsTextImage.GetOffsetOfTextAddress(TextAddress ta, out int piOffset)
 {
     piOffset = 0;
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 16
0
 public virtual int GetWordExtent(IVsTextLayer textLayer, TextAddress textAddress, WORDEXTFLAGS flags, TextSpan[] span) {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 17
0
 /// <summary>
 /// To return the text address of the given buffer address. No need to implement
 /// </summary>
 /// <param name="iOffset">offset from the start of the buffer</param>
 /// <param name="pta">will contain the TextAddress</param>
 /// <returns></returns>
 int IVsTextImage.GetTextAddressOfOffset(int iOffset, TextAddress[] pta)
 {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 18
0
 int IVsLanguageTextOps.GetPairExtent(IVsTextLayer pTextLayer, TextAddress ta, TextSpan[] pts)
 {
     return VSConstants.E_NOTIMPL;
 }
Esempio n. 19
0
 public int GetPairExtent(IVsTextLayer pTextLayer, TextAddress ta, TextSpan[] pts)
 {
     return(failed);
 }
Esempio n. 20
0
 int IVsLanguageTextOps.GetWordExtent(IVsTextLayer pTextLayer, TextAddress ta, WORDEXTFLAGS flags, TextSpan[] pts)
 {
     return VSConstants.E_NOTIMPL;
 }
 public int GetPairExtent(IVsTextLayer textLayer, TextAddress ta, TextSpan[] textSpan)
 => VSConstants.E_NOTIMPL;
Esempio n. 22
0
 public int GetPairExtent(IVsTextLayer pTextLayer, TextAddress ta, TextSpan[] pts)
 {
     return FAILED;
 }
 public void CustomerBilling(string Vname, string Vaddress)
 {
     TextName.SendKeys(Vname);
     TextAddress.SendKeys(Vaddress);
 }
        private bool IsCheckInput()
        {
            if (string.IsNullOrEmpty(this.TextCrowName.Text))
            {
                MessageBox.Show("众筹名称不能为空!", "提示");
                TextCrowName.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextBeginDate.Text))
            {
                MessageBox.Show("开始时间不能为空!", "提示");
                TextBeginDate.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextEndDate.Text))
            {
                MessageBox.Show("结束时间不能为空!", "提示");
                TextEndDate.Focus();
                return(false);
            }

            if (TextBeginDate.Value <= DateTime.Now)
            {
                MessageBox.Show("开始时间必须晚于今天!", "提示");
                TextBeginDate.Focus();
                return(false);
            }
            if (TextBeginDate.Value >= TextEndDate.Value)
            {
                MessageBox.Show("开始时间必须早于结束时间!", "提示");
                TextEndDate.Focus();
                return(false);
            }

            if (this.CityControl.GetCity() == null)
            {
                MessageBox.Show("城市不能为空!", "提示");
                CityControl.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextAddress.Text.Trim()))
            {
                MessageBox.Show("服务地点详细地址不能为空!", "提示");
                TextAddress.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextServiceDuration.Text))
            {
                MessageBox.Show("服务时长不能为空!", "提示");
                TextServiceDuration.Focus();
                return(false);
            }

            if (this.TextActor.SelectActor == null)
            {
                MessageBox.Show("服务艺人不能为空!", "提示");
                TextActor.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextServiceCost.Text.Trim()))
            {
                MessageBox.Show("服务费用不能为空!", "提示");
                TextServiceCost.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextNote.HtmlContent.Trim()))
            {
                MessageBox.Show("注意事项不能为空!", "提示");
                TextNote.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextFrontImg.GetUrl().Trim()))
            {
                MessageBox.Show("封面图不能为空!", "提示");
                TextFrontImg.Focus();
                return(false);
            }
            if (string.IsNullOrEmpty(this.TextServiceIntro.HtmlContent.Trim()))
            {
                MessageBox.Show("封面图不能为空!", "提示");
                TextServiceIntro.Focus();
                return(false);
            }
            if (this.TextCrowDetail.CtTypes.Count == 0)
            {
                MessageBox.Show("众筹详情不能为空!", "提示");
                TextCrowDetail.Focus();
                return(false);
            }
            return(true);
        }