Beispiel #1
0
        //이력서 수정
        private void Resume_Update()
        {
            SqlConnection sqlconn = new SqlConnection(strconn);

            try
            {
                sqlconn.Open();
                string UpdateText = "update RESUME set RE_SUBJECT = @re_subject, LICENSE=@license, EXP =@exp, CONTENT =@content, LOCATION =@location where ID = @id";

                SqlCommand cmd = new SqlCommand(UpdateText, sqlconn);
                cmd.Parameters.AddWithValue("@id", IMemberMainForm.getID());
                cmd.Parameters.AddWithValue("@re_subject", IMenu3.getSbj());
                cmd.Parameters.AddWithValue("@license", IMenu3.getLic());
                cmd.Parameters.AddWithValue("@exp", IMenu3.getEx());
                cmd.Parameters.AddWithValue("@content", IMenu3.getCon());
                cmd.Parameters.AddWithValue("@location", IMenu3.getLoca());

                cmd.BeginExecuteNonQuery();
                sqlconn.Close();

                Log.printLog("이력서 수정 완료");
            }catch (Exception ee)
            {
                Log.printLog("이력서 수정 실패");
                MessageBox.Show(ee.Message);
                MessageBox.Show(ee.StackTrace);
            }
            finally
            {
                sqlconn.Close();
            }
        }
Beispiel #2
0
        //이력서 insert sql
        private void Resume_Insert()
        {
            SqlConnection sqlconn = new SqlConnection(strconn);

            try
            {
                sqlconn.Open();
                string     InsertText = "Insert Into RESUME (RE_NUM,ID,NAME,ADDR,EMAIL,PHONE,RE_SUBJECT,LICENSE,EXP,CONTENT,LOCATION) VALUES(NEXT VALUE FOR RE_NUMBER,@id,@name,@addr,@email,@phone,@re_subject,@license,@exp,@content,@location)";
                SqlCommand cmd        = new SqlCommand(InsertText, sqlconn);

                //cmd.Parameters.AddWithValue("@re_num", count);
                cmd.Parameters.AddWithValue("@id", IMemberMainForm.getID());
                cmd.Parameters.AddWithValue("@name", IMemberMainForm.getName());
                cmd.Parameters.AddWithValue("@addr", IMemberMainForm.getAddr());
                cmd.Parameters.AddWithValue("@email", IMemberMainForm.getEmail());
                cmd.Parameters.AddWithValue("@phone", IMemberMainForm.getPhone());
                cmd.Parameters.AddWithValue("@re_subject", IMenu3.getSbj());
                cmd.Parameters.AddWithValue("@license", IMenu3.getLic());
                cmd.Parameters.AddWithValue("@exp", IMenu3.getEx());
                cmd.Parameters.AddWithValue("@content", IMenu3.getCon());
                cmd.Parameters.AddWithValue("@location", IMenu3.getLoca());

                checkOverlap();
                if (checkOver == true)
                {
                    MessageBox.Show("중복 지원할 수 없습니다");
                }
                else
                {
                    cmd.ExecuteNonQuery();
                    //cmd.CommandText = "Update RESUME set RE_NUM = (select RE_NUM from RESUME where RE_NUM = @re_num1)+1 where RE_NUM = @re_num2";
                    //cmd.Parameters.AddWithValue("@re_num1", IMenu3.getRenum());
                    //cmd.Parameters.AddWithValue("@re_num2", IMenu3.getRenum());
                    //cmd.ExecuteNonQuery();
                    MessageBox.Show("등록되었습니다.");
                    Log.printLog("이력서 저장 완료");
                }


                sqlconn.Close();
            }
            catch (Exception ee)
            {
                Log.printLog("이력서 저장 실패");
                MessageBox.Show(ee.Message);
                MessageBox.Show(ee.StackTrace);
            }
            finally
            {
                sqlconn.Close();
            }
        }