2024-05-18 15:28:29 +08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
using System.Web;
|
|
|
|
|
|
using System.Web.UI;
|
|
|
|
|
|
using System.Web.UI.WebControls;
|
|
|
|
|
|
using Maticsoft.BLL;
|
|
|
|
|
|
using System.Data;
|
|
|
|
|
|
using System.Data.SqlClient;
|
|
|
|
|
|
using Ajax;
|
|
|
|
|
|
using System.IO;
|
|
|
|
|
|
public partial class Employee_Form : CommonPage
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
//创建一个共用的编码bll层
|
|
|
|
|
|
Maticsoft.BLL.nr_sys_bianma bm = new Maticsoft.BLL.nr_sys_bianma();
|
|
|
|
|
|
//创建一个共用的类型BLL层
|
|
|
|
|
|
Maticsoft.BLL.nr_sys_leixing bmlx = new Maticsoft.BLL.nr_sys_leixing();
|
|
|
|
|
|
//创建一个共用的物料bll层
|
|
|
|
|
|
Maticsoft.BLL.nr_z_ryda rybll = new Maticsoft.BLL.nr_z_ryda();
|
|
|
|
|
|
//创建一个共用的物料模板
|
|
|
|
|
|
Maticsoft.Model.nr_z_ryda ry = new Maticsoft.Model.nr_z_ryda();
|
|
|
|
|
|
//创建一个操作记录模板
|
|
|
|
|
|
Maticsoft.Model.nr_sys_rizhi rizhi = new Maticsoft.Model.nr_sys_rizhi();
|
|
|
|
|
|
//创建一个操作记录bll
|
|
|
|
|
|
Maticsoft.BLL.nr_sys_rizhi rizhibll = new Maticsoft.BLL.nr_sys_rizhi();
|
|
|
|
|
|
public string wulmingtishi = "";
|
|
|
|
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
Utility.RegisterTypeForAjax(typeof(Employee_Form));
|
|
|
|
|
|
if (!IsPostBack)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Session["user"] == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Redirect("../index.aspx");
|
|
|
|
|
|
}
|
|
|
|
|
|
//获取角色权限
|
|
|
|
|
|
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
|
|
|
|
|
|
|
|
|
|
|
|
binddata();
|
|
|
|
|
|
if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString().Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
pdquanxianbj(user.juese);
|
|
|
|
|
|
string uid = Request.QueryString["uid"].ToString();
|
|
|
|
|
|
id.Value = uid;
|
|
|
|
|
|
initdata(uid);
|
|
|
|
|
|
setgyxx();
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
jzgyxx();
|
|
|
|
|
|
pdquanxian(user.juese);
|
|
|
|
|
|
if (Request.QueryString["fid"] != null && Request.QueryString["fid"].ToString().Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
string fid = Request.QueryString["fid"].ToString();
|
|
|
|
|
|
initdata(fid);
|
|
|
|
|
|
setgyxx();
|
|
|
|
|
|
}
|
|
|
|
|
|
//赋值默认值
|
|
|
|
|
|
bh.Text = "自动生成";
|
|
|
|
|
|
rzrq.Value = DateTime.Now.ToString("yyyy-MM-dd");
|
|
|
|
|
|
//htdq.Value = DateTime.Now.AddYears(1).ToString("yyyy-MM-dd");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#region 用来初始化绑定下拉框等值
|
|
|
|
|
|
private void binddata()
|
|
|
|
|
|
{
|
|
|
|
|
|
//jbgz.Value = "0";
|
|
|
|
|
|
|
|
|
|
|
|
DataSet hylx = bmlx.GetAllList();
|
|
|
|
|
|
DataRow [] dr = hylx.Tables[0].Select("leixing='学历'");
|
|
|
|
|
|
if (dr != null && dr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
DataSet xz = bm.GetList("zhongleiid='" + dr[0]["id"] + "'");
|
|
|
|
|
|
if (xz != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
xl.DataSource = xz.Tables[0].DefaultView;
|
|
|
|
|
|
xl.DataValueField = "id";
|
|
|
|
|
|
xl.DataTextField = "mingcheng";
|
|
|
|
|
|
xl.DataBind();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
dr = hylx.Tables[0].Select("leixing='职务'");
|
|
|
|
|
|
if (dr != null && dr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
DataSet xz = bm.GetList("zhongleiid='" + dr[0]["id"] + "'");
|
|
|
|
|
|
if (xz != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
zw.DataSource = xz.Tables[0].DefaultView;
|
|
|
|
|
|
zw.DataValueField = "id";
|
|
|
|
|
|
zw.DataTextField = "mingcheng";
|
|
|
|
|
|
zw.DataBind();
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
DataSet zhds = DBHlper.Execute("select * from nr_z_yhzh where yangshi='1'");
|
|
|
|
|
|
if (zhds != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
glzh.DataSource = zhds.Tables[0].DefaultView;
|
|
|
|
|
|
glzh.DataValueField = "zhanghao";
|
|
|
|
|
|
glzh.DataTextField = "zhanghao";
|
|
|
|
|
|
glzh.DataBind();
|
|
|
|
|
|
ListItem list = new ListItem("无", "无");
|
|
|
|
|
|
glzh.Items.Add(list);
|
|
|
|
|
|
glzh.SelectedIndex = glzh.Items.Count - 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 修改时获取真正数据值
|
|
|
|
|
|
private void initdata(string did)
|
|
|
|
|
|
{
|
|
|
|
|
|
int idz = Convert.ToInt32(did);
|
|
|
|
|
|
ry = rybll.GetModel(idz);
|
|
|
|
|
|
if (ry != null)
|
|
|
|
|
|
{
|
|
|
|
|
|
bh.Text = ry.bh.ToString();
|
|
|
|
|
|
xm.Text = ry.xm.ToString();
|
|
|
|
|
|
jg.Text = ry.jg.ToString();
|
|
|
|
|
|
xjd.Text = ry.xjd.ToString();
|
|
|
|
|
|
sfzh.Text = ry.sfzh.ToString();
|
|
|
|
|
|
csrq.Value = Convert.ToDateTime(ry.csrq).ToString("yyyy-MM-dd").ToString();
|
|
|
|
|
|
xl.Text = ry.xl.ToString();
|
|
|
|
|
|
lxfs.Value = ry.lxfs.ToString();
|
|
|
|
|
|
zw.Text = ry.zw.ToString();
|
|
|
|
|
|
rzrq.Value = Convert.ToDateTime(ry.rzrq).ToString("yyyy-MM-dd").ToString();
|
|
|
|
|
|
//htdq.Value = Convert.ToDateTime(ry.htdq).ToString("yyyy-MM-dd").ToString();
|
|
|
|
|
|
//jbgz.Value = Convert.ToDecimal(ry.jbgz).ToString();
|
|
|
|
|
|
zt.Text = ry.zt;
|
|
|
|
|
|
glzh.Text = ry.glzh;
|
|
|
|
|
|
bz.Value = ry.bz.ToString();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 获取页面参数赋值model对象
|
|
|
|
|
|
private void getmd()
|
|
|
|
|
|
{
|
|
|
|
|
|
ry.bh = bh.Text;
|
|
|
|
|
|
ry.xm = xm.Text;
|
|
|
|
|
|
ry.jg = jg.Text;
|
|
|
|
|
|
ry.xjd = xjd.Text;
|
|
|
|
|
|
ry.sfzh = sfzh.Text;
|
|
|
|
|
|
ry.csrq = Convert.ToDateTime(csrq.Value);
|
|
|
|
|
|
ry.xl = xl.Text;
|
|
|
|
|
|
ry.lxfs = lxfs.Value;
|
|
|
|
|
|
ry.zw = zw.Text;
|
|
|
|
|
|
ry.glzh = glzh.Text;
|
|
|
|
|
|
ry.rzrq = Convert.ToDateTime(rzrq.Value);
|
|
|
|
|
|
//ry.htdq = Convert.ToDateTime(htdq.Value);
|
|
|
|
|
|
ry.djqxv = djgyqxhd.Value;
|
|
|
|
|
|
ry.xfqxv = xfgyqxhd.Value;
|
|
|
|
|
|
ry.zwjnxv = jngyqxhd.Value;
|
|
|
|
|
|
/*try
|
|
|
|
|
|
{
|
|
|
|
|
|
ry.jbgz = Convert.ToDecimal(jbgz.Value);
|
|
|
|
|
|
}
|
|
|
|
|
|
catch
|
|
|
|
|
|
{
|
|
|
|
|
|
ry.jbgz = 0;
|
|
|
|
|
|
}*/
|
|
|
|
|
|
ry.zt = zt.Text;
|
|
|
|
|
|
ry.bz = bz.Value;
|
|
|
|
|
|
|
|
|
|
|
|
Maticsoft.Model.nr_z_ryda getry = new Maticsoft.Model.nr_z_ryda();
|
|
|
|
|
|
if (Request.QueryString["uid"] != null && Request.QueryString["uid"].ToString().Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int idz = Convert.ToInt32(id.Value);
|
|
|
|
|
|
getry = rybll.GetModel(idz);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*if (zmzp.FileContent.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
FileUpLoadzm();
|
|
|
|
|
|
ry.zmzp = zmName;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
ry.zmzp = getry.zmzp; ;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (bmzp.FileContent.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
FileUpLoadbm();
|
|
|
|
|
|
ry.bmzp = bmName;
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
ry.bmzp = getry.bmzp;
|
|
|
|
|
|
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
//给日志模板赋值
|
|
|
|
|
|
rizhi.riqi = DateTime.Now;
|
|
|
|
|
|
rizhi.leixing = "人员档案";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 添加时候加载工艺信息
|
|
|
|
|
|
private void jzgyxx()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
//修改页面时,首先吧项目明细的表头加载出来
|
|
|
|
|
|
string biao = "<table width='100%' class='bule' id='ddxm' > ";
|
|
|
|
|
|
DataSet dtgx = DBHlper.Execute("select * from view_bianma where zhonglei='工序项目'");
|
|
|
|
|
|
string gxcode = "<tr><td style='width:120px;'><span>登记工艺权限</span></td><td><ul>";
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='制模'> 制模</li>";
|
|
|
|
|
|
foreach (DataRow dr in dtgx.Tables[0].Rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='土坯仓'> 土坯仓</li>";
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='素坯仓'> 素坯仓</li>";
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='白地仓'> 白地仓</li>";
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='成品仓'> 成品仓</li>";
|
|
|
|
|
|
gxcode += "</ul></td></tr>";
|
|
|
|
|
|
gxcode += "<tr><td style='width:120px;'><span>下发工艺权限</span></td><td><ul>";
|
|
|
|
|
|
foreach (DataRow dr in dtgx.Tables[0].Rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='土坯仓'> 土坯仓</li>";
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='素坯仓'> 素坯仓</li>";
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='白地仓'> 白地仓</li>";
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='成品仓'> 成品仓</li>";
|
|
|
|
|
|
gxcode += "</ul></td></tr>";
|
|
|
|
|
|
gxcode += "<tr><td style='width:120px;'><span>掌握技能权限</span></td><td><ul>";
|
|
|
|
|
|
foreach (DataRow dr in dtgx.Tables[0].Rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='jn_gx' tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
gxcode += "</ul></td></tr>";
|
|
|
|
|
|
//gysq.InnerHtml=biao+gxcode+"</table>";
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region 编辑时候加载工艺信息
|
|
|
|
|
|
private void setgyxx()
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
//修改页面时,首先吧项目明细的表头加载出来
|
|
|
|
|
|
string biao = "<table width='100%' class='bule' id='ddxm'> ";
|
|
|
|
|
|
DataSet dtgx = DBHlper.Execute("select * from view_bianma where zhonglei='工序项目'");
|
|
|
|
|
|
string gxcode = "<tr><td style='width:120px;'><span>登记工艺权限</span></td><td><ul>";
|
|
|
|
|
|
DataSet djqxgyds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='"+id.Value+"' and qxlx='登记权限'");
|
|
|
|
|
|
DataRow[] ckdr = djqxgyds.Tables[0].Select("gyxx='制模'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' checked tag='制模'> 制模</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='制模'> 制模</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
foreach (DataRow dr in dtgx.Tables[0].Rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
DataRow[] selectdr = djqxgyds.Tables[0].Select("gyxx='" + dr["mingcheng"] + "'");
|
|
|
|
|
|
if (selectdr != null && selectdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' checked tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
ckdr = djqxgyds.Tables[0].Select("gyxx='土坯仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' checked tag='土坯仓'> 土坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='土坯仓'> 土坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
ckdr = djqxgyds.Tables[0].Select("gyxx='素坯仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' checked tag='素坯仓'> 素坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='素坯仓'> 素坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
ckdr = djqxgyds.Tables[0].Select("gyxx='白地仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' checked tag='白地仓'> 白地仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='白地仓'> 白地仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
ckdr = djqxgyds.Tables[0].Select("gyxx='成品仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' checked tag='成品仓'> 成品仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='dj_gx' tag='成品仓'> 成品仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gxcode += "</ul></td></tr>";
|
|
|
|
|
|
gxcode += "<tr><td style='width:120px;'><span>下发工艺权限</span></td><td><ul>";
|
|
|
|
|
|
DataSet xfqxgyds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='下发权限'");
|
|
|
|
|
|
foreach (DataRow dr in dtgx.Tables[0].Rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
DataRow[] selectdr = xfqxgyds.Tables[0].Select("gyxx='" + dr["mingcheng"] + "'");
|
|
|
|
|
|
if (selectdr != null && selectdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' checked tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ckdr = xfqxgyds.Tables[0].Select("gyxx='土坯仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' checked tag='土坯仓'> 土坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' tag='土坯仓'> 土坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
ckdr = xfqxgyds.Tables[0].Select("gyxx='素坯仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' checked tag='素坯仓'> 素坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' tag='素坯仓'> 素坯仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
ckdr = xfqxgyds.Tables[0].Select("gyxx='白地仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' checked tag='白地仓'> 白地仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' tag='白地仓'> 白地仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
ckdr = xfqxgyds.Tables[0].Select("gyxx='成品仓'");
|
|
|
|
|
|
if (ckdr != null && ckdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' checked tag='成品仓'> 成品仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='xf_gx' tag='成品仓'> 成品仓</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gxcode += "</ul></td></tr>";
|
|
|
|
|
|
gxcode += "<tr><td style='width:120px;'><span>掌握技能权限</span></td><td ><ul>";
|
|
|
|
|
|
DataSet jnqxgyds = DBHlper.Execute("select * from nr_z_ryda_gxqx where ryid='" + id.Value + "' and qxlx='掌握技能'");
|
|
|
|
|
|
foreach (DataRow dr in dtgx.Tables[0].Rows)
|
|
|
|
|
|
{
|
|
|
|
|
|
DataRow[] selectdr = jnqxgyds.Tables[0].Select("gyxx='" + dr["mingcheng"] + "'");
|
|
|
|
|
|
if (selectdr != null && selectdr.Length > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='jn_gx' checked tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
gxcode += "<li class='gxli'><input type='checkbox' class='jn_gx' tag='" + dr["mingcheng"] + "'> " + dr["mingcheng"] + "</li>";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
gxcode += "</ul></td></tr>";
|
|
|
|
|
|
//gysq.InnerHtml = biao + gxcode + "</table>";
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
#region 敏感权限查看
|
|
|
|
|
|
void pdquanxian(int juese)
|
|
|
|
|
|
{
|
|
|
|
|
|
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
|
|
|
|
|
|
if (DBHlper.getzt(user.id) != 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Redirect("../index.aspx");
|
|
|
|
|
|
}
|
2024-05-21 15:05:24 +08:00
|
|
|
|
if (DBHlper.GetPermission(juese, "人员档案", "nr_z_ryda", "添加") == false)
|
2024-05-18 15:28:29 +08:00
|
|
|
|
{
|
|
|
|
|
|
Response.Redirect("../Common/nopower.htm");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#region 敏感权限查看
|
|
|
|
|
|
void pdquanxianbj(int juese)
|
|
|
|
|
|
{
|
|
|
|
|
|
Maticsoft.Model.nr_z_yhzh user = (Maticsoft.Model.nr_z_yhzh)(Session["user"]);
|
|
|
|
|
|
if (DBHlper.getzt(user.id) != 1)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Redirect("../index.aspx");
|
|
|
|
|
|
}
|
2024-05-21 15:05:24 +08:00
|
|
|
|
if (DBHlper.GetPermission(juese, "人员档案", "nr_z_ryda", "编辑") == false)
|
2024-05-18 15:28:29 +08:00
|
|
|
|
{
|
|
|
|
|
|
Response.Redirect("../Common/nopower.htm");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//保存操作
|
|
|
|
|
|
protected void bt_tj_Click(object sender, EventArgs e)
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
if (xm.Text == "" || xm.Text == null)
|
|
|
|
|
|
{
|
|
|
|
|
|
z_error.Text = "姓名不能为空!";
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
string caozuo = "添加";
|
|
|
|
|
|
getmd();
|
|
|
|
|
|
//接收成功参数值
|
|
|
|
|
|
int rtx = 0;
|
|
|
|
|
|
//判断uid是否存在值,有值为修改,无值为添加
|
|
|
|
|
|
if (id.Value != null && id.Value != "")
|
|
|
|
|
|
{
|
|
|
|
|
|
ry.id = Convert.ToInt32(id.Value);
|
|
|
|
|
|
if (rybll.Update(ry))
|
|
|
|
|
|
{
|
|
|
|
|
|
rtx = Convert.ToInt32(id.Value);
|
|
|
|
|
|
caozuo = "修改";
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
ry.bh = DBHlper.getbh("RY-", "nr_z_ryda", "bh", 4);
|
|
|
|
|
|
bh.Text = ry.bh;
|
|
|
|
|
|
rtx = rybll.Add(ry);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
if (rtx > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
int delez=DBHlper.excutecmd("delete nr_z_ryda_gxqx where ryid='" + rtx + "'");
|
|
|
|
|
|
foreach (string djgx in djgyqxhd.Value.Split(','))
|
|
|
|
|
|
{
|
|
|
|
|
|
int djz=DBHlper.excutecmd("insert into nr_z_ryda_gxqx (ryid,gyxx,qxlx) values ('"+rtx+"','"+djgx+"','登记权限')");
|
|
|
|
|
|
}
|
|
|
|
|
|
foreach (string xfgx in xfgyqxhd.Value.Split(','))
|
|
|
|
|
|
{
|
|
|
|
|
|
int djz = DBHlper.excutecmd("insert into nr_z_ryda_gxqx (ryid,gyxx,qxlx) values ('" + rtx + "','" + xfgx + "','下发权限')");
|
|
|
|
|
|
}
|
|
|
|
|
|
foreach (string jngx in jngyqxhd.Value.Split(','))
|
|
|
|
|
|
{
|
|
|
|
|
|
int djz = DBHlper.excutecmd("insert into nr_z_ryda_gxqx (ryid,gyxx,qxlx) values ('" + rtx + "','" + jngx + "','掌握技能')");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//将session转换对象取值
|
|
|
|
|
|
Maticsoft.Model.nr_z_yhzh zh = (Maticsoft.Model.nr_z_yhzh)Session["user"];
|
|
|
|
|
|
rizhi.yonghuming = zh.zhanghao;
|
|
|
|
|
|
//拼接字符串插入日志
|
|
|
|
|
|
rizhi.jilu = zh.zhanghao + caozuo + "了人员档案,档案编号为:" + bh.Text.Trim();
|
|
|
|
|
|
rizhibll.Add(rizhi);
|
|
|
|
|
|
|
|
|
|
|
|
Response.Redirect("Employee_browse.aspx?uid=" + rtx, false);
|
|
|
|
|
|
}
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Redirect("../Common/error.aspx");
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
catch (Exception)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Redirect("../Common/error.aspx");
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
/*string zmName = "";
|
|
|
|
|
|
public void FileUpLoadzm()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!zmzp.HasFile && !zmzp.HasFile)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Write("<script>alert('请选择要上传的文件')</script>");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!zmzp.HasFile) { }
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
string directoyPath = System.Web.HttpContext.Current.Server.MapPath("~/Client_Folder/");
|
|
|
|
|
|
if (!System.IO.Directory.Exists(directoyPath))
|
|
|
|
|
|
{
|
|
|
|
|
|
System.IO.Directory.CreateDirectory(directoyPath);
|
|
|
|
|
|
}
|
|
|
|
|
|
zmName = zmzp.PostedFile.FileName.Substring(zmzp.PostedFile.FileName.LastIndexOf("\\") + 1);
|
|
|
|
|
|
//改名字
|
|
|
|
|
|
// string name = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + fileName;//
|
|
|
|
|
|
string path = "~/Client_Folder/" + zmName;
|
|
|
|
|
|
|
|
|
|
|
|
if (File.Exists(path))
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Write("<script language='javascript'>alert('服务器上已经有了你正在上传的文件:" + zmName + "!');</script>");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
zmzp.PostedFile.SaveAs(Server.MapPath(path));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch
|
|
|
|
|
|
{ Response.Write("<script>alert('上传失败!')</script>"); }
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string bmName = "";
|
|
|
|
|
|
public void FileUpLoadbm()
|
|
|
|
|
|
{
|
|
|
|
|
|
try
|
|
|
|
|
|
{
|
|
|
|
|
|
if (!bmzp.HasFile && !bmzp.HasFile)
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Write("<script>alert('请选择要上传的文件')</script>");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
if (!bmzp.HasFile) { }
|
|
|
|
|
|
else
|
|
|
|
|
|
{
|
|
|
|
|
|
string directoyPath = System.Web.HttpContext.Current.Server.MapPath("~/Client_Folder/");
|
|
|
|
|
|
if (!System.IO.Directory.Exists(directoyPath))
|
|
|
|
|
|
{
|
|
|
|
|
|
System.IO.Directory.CreateDirectory(directoyPath);
|
|
|
|
|
|
}
|
|
|
|
|
|
bmName = bmzp.PostedFile.FileName.Substring(bmzp.PostedFile.FileName.LastIndexOf("\\") + 1);
|
|
|
|
|
|
//改名字
|
|
|
|
|
|
// string name = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + fileName;//
|
|
|
|
|
|
string path = "~/Client_Folder/" + bmName;
|
|
|
|
|
|
|
|
|
|
|
|
if (File.Exists(path))
|
|
|
|
|
|
{
|
|
|
|
|
|
Response.Write("<script language='javascript'>alert('服务器上已经有了你正在上传的文件:" + bmName + "!');</script>");
|
|
|
|
|
|
return;
|
|
|
|
|
|
}
|
|
|
|
|
|
bmzp.PostedFile.SaveAs(Server.MapPath(path));
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
catch
|
|
|
|
|
|
{ Response.Write("<script>alert('上传失败!')</script>"); }
|
|
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|