Ejemplo n.º 1
0
        public void tiaoban_application(string user_name, DateTimePicker dateTimePicker2, DateTimePicker dateTimePicker4, ComboBox comboBox3, TextBox textBox1)
        {
            int arrangementId_self, arrangementId_others;

            Barrangement  ba = new Barrangement();
            Bchangerecord bc = new Bchangerecord();

            DTO4Arrangement dto4a_self = new DTO4Arrangement();

            dto4a_self         = ba.QueryArrangementIdByDoctorNameAndBeginTime(user_name, dateTimePicker2.Value.Date);
            arrangementId_self = int.Parse(dto4a_self.Id);

            DTO4Arrangement dto4a_others = new DTO4Arrangement();

            dto4a_others         = ba.QueryArrangementIdByDoctorNameAndBeginTime(comboBox3.SelectedValue.ToString(), dateTimePicker4.Value.Date);
            arrangementId_others = int.Parse(dto4a_others.Id);

            if (bc.InsertChangeRecord(arrangementId_self, arrangementId_others, textBox1.Text, "untreated"))
            {
                MessageBox.Show("申请成功!");
            }
            else
            {
                MessageBox.Show("申请失败,请确认是否正确选择班次!");
            }
        }
Ejemplo n.º 2
0
        public void qingjia_application(string user_name, DateTimePicker dateTimePicker3, TextBox textBox2)
        {
            int arrangementId_self;

            Barrangement  ba = new Barrangement();
            Bchangerecord bc = new Bchangerecord();

            DTO4Arrangement dto4a_self = new DTO4Arrangement();

            dto4a_self         = ba.QueryArrangementIdByDoctorNameAndBeginTime(user_name, dateTimePicker3.Value.Date);
            arrangementId_self = int.Parse(dto4a_self.Id);

            if (bc.InsertChangeRecord(arrangementId_self, 0, textBox2.Text, "untreated"))
            {
                MessageBox.Show("申请成功!");
            }
            else
            {
                MessageBox.Show("申请失败,请确认是否正确选择班次!");
            }
        }