Beispiel #1
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPJiXiao Model = new ZWL.BLL.ERPJiXiao();

        Model.ID       = int.Parse(Request.QueryString["ID"].ToString());
        Model.JXName   = this.txtJXName.Text.ToString();
        Model.JianJie  = this.txtJianJie.Text.ToString();
        Model.UserName = this.txtUserName.Text.ToString();
        Model.TimeStr  = DateTime.Parse(this.txtTimeStr.Text);

        Model.Update();

        //写入考核详细记录表中!!!!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        //获取动态参数项
        DataSet CanShuDT = ZWL.DBUtility.DbHelperSQL.GetDataSet("select ItemName,ID from ERPJiXiaoCanShu order by BackInfo");
        //绑定数据到列表中
        DataSet UserDT = ZWL.DBUtility.DbHelperSQL.GetDataSet("select UserName from ERPUser order by UserName asc");

        //清空上一次的详细记录,然后重新添加。
        ZWL.DBUtility.DbHelperSQL.ExecuteSQL("delete from ERPJXDetails where JXID=" + Request.QueryString["ID"].ToString());

        //插入数据到数据表
        for (int j = 0; j < UserDT.Tables[0].Rows.Count; j++)
        {
            for (int K = 0; K < CanShuDT.Tables[0].Rows.Count; K++)
            {
                //添加最新的考核数据
                ZWL.BLL.ERPJXDetails MyModel = new ZWL.BLL.ERPJXDetails();
                MyModel.JXID     = int.Parse(Request.QueryString["ID"].ToString());
                MyModel.ItemsID  = int.Parse(CanShuDT.Tables[0].Rows[K]["ID"].ToString());
                MyModel.UserName = UserDT.Tables[0].Rows[j]["UserName"].ToString();
                MyModel.NumStr   = Request.Form["InP-" + UserDT.Tables[0].Rows[j]["UserName"].ToString() + "-" + CanShuDT.Tables[0].Rows[K]["ID"].ToString()].ToString();
                MyModel.Add();
            }
        }

        //写系统日志
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName    = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "用户修改绩效考核信息(" + this.txtJXName.Text + ")";
        MyRiZhi.IpStr       = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "绩效考核信息修改成功!", "JiXiao.aspx");
    }
Beispiel #2
0
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        ZWL.BLL.ERPJiXiao Model = new ZWL.BLL.ERPJiXiao();

        Model.JXName=this.txtJXName.Text.ToString();
        Model.JianJie=this.txtJianJie.Text.ToString();
        Model.UserName=ZWL.Common.PublicMethod.GetSessionValue("UserName");
        Model.TimeStr=DateTime.Now;

        int JXIDStr=Model.Add();

        //д�뿼����ϸ��¼���У�����������
        //��ȡ��̬������
        DataSet CanShuDT = ZWL.DBUtility.DbHelperSQL.GetDataSet("select ItemName,ID from ERPJiXiaoCanShu order by BackInfo");
        //�����ݵ��б���
        DataSet UserDT = ZWL.DBUtility.DbHelperSQL.GetDataSet("select UserName from ERPUser order by UserName asc");
        //�������ݵ����ݱ�
        for (int j = 0; j < UserDT.Tables[0].Rows.Count; j++)
        {
            for (int K = 0; K < CanShuDT.Tables[0].Rows.Count; K++)
            {
                ZWL.BLL.ERPJXDetails MyModel = new ZWL.BLL.ERPJXDetails();
                MyModel.JXID = JXIDStr;
                MyModel.ItemsID = int.Parse(CanShuDT.Tables[0].Rows[K]["ID"].ToString());
                MyModel.UserName = UserDT.Tables[0].Rows[j]["UserName"].ToString();
                MyModel.NumStr = Request.Form["InP-" + UserDT.Tables[0].Rows[j]["UserName"].ToString() + "-" + CanShuDT.Tables[0].Rows[K]["ID"].ToString()].ToString();
                MyModel.Add();
            }
        }

        //дϵͳ��־
        ZWL.BLL.ERPRiZhi MyRiZhi = new ZWL.BLL.ERPRiZhi();
        MyRiZhi.UserName = ZWL.Common.PublicMethod.GetSessionValue("UserName");
        MyRiZhi.DoSomething = "�û���Ӽ�Ч������Ϣ(" + this.txtJXName.Text + ")";
        MyRiZhi.IpStr = System.Web.HttpContext.Current.Request.UserHostAddress.ToString();
        MyRiZhi.Add();

        ZWL.Common.MessageBox.ShowAndRedirect(this, "��Ч������Ϣ��ӳɹ���", "JiXiao.aspx");
    }