/* * * 简历面板 * */ private void JianLiInitSet(RSManage sn_sn) { lblName.txt.Text = sn_sn.Name; lblBorn.txt.Text = sn_sn.born; lblJiGuan.txt.Text = sn_sn.JiGuan; lblPhone.txt.Text = sn_sn.phone; string[] xinbie = sn_sn.Xingbie.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); lblSex.txt.Text = xinbie[0]; lblTxt1.txt.Text = xinbie.Length == 1 ? "" : xinbie[1]; lblEmil.txt.Text = sn_sn.EMail; lblYxiang.txt.Text = sn_sn.Yixiang; lblAddr.txt.Text = sn_sn.Addr; string[] jy = sn_sn.JiaoYu.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); lblJySj.txt.Text = jy[0] == "null" ? "" : jy[0]; lbllblJyXx.txt.Text = jy[1] == "null" ? "" : jy[1]; lbllblJyZy.txt.Text = jy[2] == "null" ? "" : jy[2]; lbllblJyNr.txt.Text = jy[3] == "null" ? "" : jy[3]; string[] gzjy = sn_sn.gzjy.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); lblGzSj.txt.Text = gzjy[0] == "null" ? "" : gzjy[0]; lblGzgs.txt.Text = gzjy[1] == "null" ? "" : gzjy[1]; lblGzzw.txt.Text = gzjy[2] == "null" ? "" : gzjy[2]; lblGzNr.txt.Text = gzjy[3] == "null" ? "" : gzjy[3]; string[] JiNeng = sn_sn.JiNeng.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); lblXmsj.txt.Text = JiNeng[0] == "null" ? "" : JiNeng[0]; lblXmm.txt.Text = JiNeng[1] == "null" ? "" : JiNeng[1]; lblXmzw.txt.Text = JiNeng[2] == "null" ? "" : JiNeng[2]; lblXmnr.txt.Text = JiNeng[3] == "null" ? "" : JiNeng[3]; lblZwPJ.txt.Text = sn_sn.Ziwopngjia; }
private void 打印简历ToolStripMenuItem_Click(object sender, EventArgs e) { UserProc.WaitStart(this); RSManage rSManage = db.Queryable <RSManage>().Where(it => it.SN == sn_sn).First(); if (rSManage == null) { MessageBox.Show("请先选择要打印的行"); } else { RSManage1 rSManage1 = new RSManage1(); string[] xinbie = rSManage.Xingbie.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); rSManage1.SN = rSManage.SN; rSManage1.Name = rSManage.Name; rSManage1.Yixiang = rSManage.Yixiang; rSManage1.Addr = rSManage.Addr; rSManage1.phone = rSManage.phone; rSManage1.EMail = rSManage.EMail; rSManage1.born = rSManage.born; rSManage1.JiGuan = rSManage.JiGuan; rSManage1.Xingbie = rSManage.Xingbie; rSManage1.Ziwopngjia = rSManage.Ziwopngjia; rSManage1.Xingbie = xinbie.Length == 0 ? "" : xinbie[0]; rSManage1.sf = xinbie.Length == 1 ? "" : xinbie[1]; string[] jy = rSManage.JiaoYu.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); rSManage1.JiaoYu1 = jy[0] == "null" ? "" : jy[0]; rSManage1.JiaoYu2 = jy[1] == "null" ? "" : jy[1]; rSManage1.JiaoYu3 = jy[2] == "null" ? "" : jy[2]; rSManage1.JiaoYu4 = jy[3] == "null" ? "" : jy[3]; string[] gzjy = rSManage.gzjy.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); rSManage1.gzjy1 = gzjy[0] == "null" ? "" : gzjy[0]; rSManage1.gzjy2 = gzjy[1] == "null" ? "" : gzjy[1]; rSManage1.gzjy3 = gzjy[2] == "null" ? "" : gzjy[2]; rSManage1.gzjy4 = gzjy[3] == "null" ? "" : gzjy[3]; string[] JiNeng = rSManage.JiNeng.Split(new string[] { "||" }, StringSplitOptions.RemoveEmptyEntries); rSManage1.JiNeng1 = JiNeng[0] == "null" ? "" : JiNeng[0]; rSManage1.JiNeng2 = JiNeng[1] == "null" ? "" : JiNeng[1]; rSManage1.JiNeng3 = JiNeng[2] == "null" ? "" : JiNeng[2]; rSManage1.JiNeng4 = JiNeng[3] == "null" ? "" : JiNeng[3]; FrmPrn frmPrn = new FrmPrn(); frmPrn.rptView.LocalReport.ReportEmbeddedResource = "DotNetBarProject.view.RDLC.rptTXL.rdlc"; BindingSource bindingSource = new BindingSource(); bindingSource.DataSource = rSManage1; ReportDataSource reportDataSource = new ReportDataSource(); reportDataSource.Name = "DataSet1"; reportDataSource.Value = bindingSource; frmPrn.rptView.LocalReport.DataSources.Clear(); frmPrn.rptView.LocalReport.DataSources.Add(reportDataSource); var a = frmPrn.rptView.LocalReport.DataSources; frmPrn.rptView.RefreshReport(); frmPrn.ShowDialog(); frmPrn.Close(); UserProc.WaitEnd(this); } }
//保存简历 private void btnOk_Click(object sender, EventArgs e) { if (lblName.txt.Enabled == false) { return; } RSManage rSManage = null; if (sn_sn == -1L) { rSManage = new RSManage(); rSManage.Name = lblName.txt.Text; rSManage.Yixiang = lblYxiang.txt.Text; rSManage.Addr = lblAddr.txt.Text; rSManage.phone = lblPhone.txt.Text; rSManage.EMail = lblEmil.txt.Text; rSManage.born = lblBorn.txt.Text; rSManage.JiGuan = lblJiGuan.txt.Text; rSManage.Xingbie = lblSex.txt.Text + "||" + lblTxt1.txt.Text; rSManage.JiaoYu = (lblJySj.txt.Text.Length == 0 ? "null" : lblJySj.txt.Text) + "||" + (lbllblJyXx.txt.Text.Length == 0 ? "null" : lbllblJyXx.txt.Text) + "||" + (lbllblJyZy.txt.Text.Length == 0 ? "null" : lbllblJyZy.txt.Text) + "||" + (lbllblJyNr.txt.Text.Length == 0 ? "null" : lbllblJyNr.txt.Text); rSManage.gzjy = (lblGzSj.txt.Text.Length == 0 ? "null" : lblGzSj.txt.Text) + "||" + (lblGzgs.txt.Text.Length == 0 ? "null" : lblGzgs.txt.Text) + "||" + (lblGzzw.txt.Text.Length == 0 ? "null" : lblGzzw.txt.Text) + "||" + (lblGzNr.txt.Text.Length == 0 ? "null" : lblGzNr.txt.Text); rSManage.JiNeng = (lblXmsj.txt.Text.Length == 0 ? "null" : lblXmsj.txt.Text) + "||" + (lblXmm.txt.Text.Length == 0 ? "null" : lblXmm.txt.Text) + "||" + (lblXmzw.txt.Text.Length == 0 ? "null" : lblXmzw.txt.Text) + "||" + (lblXmnr.txt.Text.Length == 0 ? "null" : lblXmnr.txt.Text); rSManage.Ziwopngjia = lblZwPJ.txt.Text; db.Insertable <RSManage>(rSManage).ExecuteCommand(); if (MessageBox.Show(this, "保存成功", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.No) { TongXunLuPanel.Visible = false; JianLi.Visible = true; JianLiInit(); } } else { var all = db.Queryable <RSManage>() .Where(it => it.SN == sn_sn) .ToList(); if (all.Count > 0) { rSManage = all[0]; rSManage.Name = lblName.txt.Text; rSManage.Yixiang = lblYxiang.txt.Text; rSManage.Addr = lblAddr.txt.Text; rSManage.phone = lblPhone.txt.Text; rSManage.EMail = lblEmil.txt.Text; rSManage.born = lblBorn.txt.Text; rSManage.JiGuan = lblJiGuan.txt.Text; //rSManage.Xingbie = lblSex.txt.Text; rSManage.Xingbie = lblSex.txt.Text + "||" + lblTxt1.txt.Text; rSManage.JiaoYu = (lblJySj.txt.Text.Length == 0 ? "null": lblJySj.txt.Text) + "||" + (lbllblJyXx.txt.Text.Length == 0 ? "null" : lbllblJyXx.txt.Text) + "||" + (lbllblJyZy.txt.Text.Length == 0 ? "null" : lbllblJyZy.txt.Text) + "||" + (lbllblJyNr.txt.Text.Length == 0 ? "null" : lbllblJyNr.txt.Text); rSManage.gzjy = (lblGzSj.txt.Text.Length == 0 ? "null" : lblGzSj.txt.Text) + "||" + (lblGzgs.txt.Text.Length == 0 ? "null" : lblGzgs.txt.Text) + "||" + (lblGzzw.txt.Text.Length == 0 ? "null" : lblGzzw.txt.Text) + "||" + (lblGzNr.txt.Text.Length == 0 ? "null" : lblGzNr.txt.Text); rSManage.JiNeng = (lblXmsj.txt.Text.Length == 0 ? "null" : lblXmsj.txt.Text) + "||" + (lblXmm.txt.Text.Length == 0 ? "null" : lblXmm.txt.Text) + "||" + (lblXmzw.txt.Text.Length == 0 ? "null" : lblXmzw.txt.Text) + "||" + (lblXmnr.txt.Text.Length == 0 ? "null" : lblXmnr.txt.Text); rSManage.Ziwopngjia = lblZwPJ.txt.Text; db.Updateable <RSManage>(rSManage).ExecuteCommand(); if (MessageBox.Show(this, "保存成功", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) != DialogResult.No) { TongXunLuPanel.Visible = true; JianLi.Visible = false; JianLiInit(); } } else { MessageBoxEx.Show("请退出重新编辑"); } } button1_Click(sender, e); }