Exemplo n.º 1
0
 private void btnCandidateInsert_Click(object sender, EventArgs e)
 {
     FrmCandidateSearchSemple fcss = new FrmCandidateSearchSemple(true);
     fcss.ShowDialog();
     humanresourcesDataSet.candidateRow can = fcss.retrunobj as humanresourcesDataSet.candidateRow;
     if (can != null)
     {
         if (clist.Where(r => r.Candidate_id == can.Candidate_id).Count() == 0)
         {
             this.dataGridView1.DataSource = null;
             humanresourcesDataSet.recommendedRow newr = this.humanresourcesDataSet1.recommended.NewrecommendedRow();
             newr.Order_id = order_id;
             newr.Candidate_id = can.Candidate_id;
             newr.Recommended_State_ID = 1;
             newr.Recommended_Order = this.clist.Count + 1;
             newr.Users_ID = ((MDIFrmParent)MdiParent).LoginUser.User_id;
             newr.Recommended_Time = DateTime.Now;
             clist.Add(newr);
             this.dataGridView1.DataSource = clist;
             this.dataGridView1.ClearSelection();
             this.dataGridView1.Rows[this.dataGridView1.Rows.Count - 1].Selected = true;
             FrmState_remark fsr = new FrmState_remark(1, this.dataGridView1.SelectedRows[0]);
             fsr.lblState.Text =this.dataGridView1.SelectedRows[0].Cells["recommended_state"].Value.ToString();
             //fsr.Location= new Point(this.Location.X+ (this.Width - fsr.Width)/2,this.Location.Y);
             fsr.ShowDialog();
             newr.Advantages = fsr.ms1;
             newr.Inferior = fsr.ms2;
             this.humanresourcesDataSet1.recommended.AddrecommendedRow(newr);
         }
         else
         {
             MessageBox.Show("已有此候选人!");
         }
     }
 }
Exemplo n.º 2
0
 void onCanSuccss(int candidateid)
 {
     foreach (humanresourcesDataSet.recommendedRow item in clist)
     {
         if (item.Candidate_id == candidateid)
         {
             SuccessId = item.Recommended_Id;
         }
         else
         {
             item.Recommended_State_ID = 4;
             FrmState_remark fsr = new FrmState_remark(2, this.dataGridView1.SelectedRows[0]);
             fsr.lblState.Text = (this.recommended_stateDataGridView.SelectedRows[0].DataBoundItem as DataRowView)["Recommended_State_Name"].ToString();
             fsr.ShowDialog();
             object[] ol = new object[4];
             ol[0] = item.Candidate_id;
             ol[1] = 4;
             ol[2] = fsr.ms1;
             ol[3] = DateTime.Now;
             remarklist.Add(ol);
         }
     }
 }
Exemplo n.º 3
0
        private void tsmiFace_Click(object sender, EventArgs e)
        {
            if (((this.dataGridView1.SelectedRows[0].DataBoundItem as humanresourcesDataSet.recommendedRow).Recommended_State_ID == 3))
            {

                FrmState_remark fsr = new FrmState_remark(2, this.dataGridView1.SelectedRows[0]);
                fsr.label7.Visible = false;
                fsr.label9.Visible = false;
                fsr.lblState.Text = "的面试信息";
                fsr.ShowDialog();
                object[] ol = new object[4];
                ol[0] = (this.dataGridView1.SelectedRows[0].DataBoundItem as humanresourcesDataSet.recommendedRow).Candidate_id;
                ol[1] = 3;
                ol[2] = fsr.ms1;
                ol[3] = DateTime.Now;
                remarklist.Add(ol);
            }
            else
            {
                MessageBox.Show("状态为\"顾问面试\"的候选人才能添加面试信息");
            }
        }
Exemplo n.º 4
0
        private void btnChangeStateSure_Click(object sender, EventArgs e)
        {
            ChangePanelVisble(this.panel2, false);
            if (Convert.ToInt32((this.recommended_stateDataGridView.SelectedRows[0].DataBoundItem as DataRowView)["Recommended_State_Id"]) != (this.dataGridView1.SelectedRows[0].DataBoundItem as humanresourcesDataSet.recommendedRow).Recommended_State_ID)
            {
                if (Convert.ToInt32((this.recommended_stateDataGridView.SelectedRows[0].DataBoundItem as DataRowView)["Recommended_State_Id"]) == 5)
                {
                    onCanSuccss((this.dataGridView1.SelectedRows[0].DataBoundItem as humanresourcesDataSet.recommendedRow).Candidate_id);
                }
                else
                {
                    FrmState_remark fsr = new FrmState_remark(2, this.dataGridView1.SelectedRows[0]);
                    fsr.lblState.Text = (this.recommended_stateDataGridView.SelectedRows[0].DataBoundItem as DataRowView)["Recommended_State_Name"].ToString();
                    fsr.ShowDialog();
                    int selectIndex = this.dataGridView1.SelectedRows[0].Index;
                    (this.dataGridView1.SelectedRows[0].DataBoundItem as humanresourcesDataSet.recommendedRow).Recommended_State_ID = Convert.ToInt32((this.recommended_stateDataGridView.SelectedRows[0].DataBoundItem as DataRowView)["Recommended_State_Id"]);
                    this.dataGridView1.DataSource = null;
                    this.dataGridView1.DataSource = clist;
                    this.dataGridView1.Rows[selectIndex].Selected = true;
                    object[] ol = new object[4];
                    ol[0] = ((this.dataGridView1.SelectedRows[0].DataBoundItem ) as humanresourcesDataSet.recommendedRow).Candidate_id;
                    ol[1] = ((this.dataGridView1.SelectedRows[0].DataBoundItem ) as humanresourcesDataSet.recommendedRow).Recommended_State_ID;
                    ol[2] = fsr.ms1;
                    ol[3] = DateTime.Now;
                    remarklist.Add(ol);
                }

            }
        }