private void Bind()
        {
            if (recordId != 0)
            {
                Med_Step med_Step = Ctrl_Ass_Remployee.SelectStepModeById(recordId);
                string info = "   /批复时间为";
                company = Ctrl_Ass_ReCompany.GetCompanyInfoByIdCard(idCard);
                lbName.Text = company.CompanyName;
                lbResName.Text = company.CompanyRes;
                lbIdCard.Text = company.ResIdCard;
                lbResult.Text = (med_Step.Result == 1 ? "已通过审批" + (info + med_Step.BossDate) : (med_Step.Result == 2 ? "未通过审批,你可以修改你的信息重新提交" : "还没有完成审批"));
                if (med_Step.Result != 1)
                {
                    this.btnSubmit.Enabled = false;
                }
                result = med_Step.Result; //保存审批通过与否的结果

                //如果想要等级已经批复完成的话,则加入其的批复时间,显示
                lbBossReason.Text = med_Step.BossReason + (med_Step.BossDate != null ? (info + med_Step.BossDate) : " ");

                stepId = med_Step.StepId;
                if (med_Step.Result == 0)
                {
                    //btn_Modify.Enabled = true;
                    //btn_Modify.OnClientClick = "window.open(" + "'ZaiJiuYe/Last_ZaiJiuYe.aspx?action=modify&id=" + employee.Id + ", 'newwindow', 'width=1000,height=900,scrollbars=yes,toolbar=no, menubar=no, location=no, status=no,resizable=yes');document.all.WebBrowser.ExecWB(45, 1);";
                }
            }
        }
Exemple #2
0
        /// <summary>
        /// 添加一行再就业招聘公司信息
        /// </summary>
        /// <param name="company">招聘公司信息实体</param>
        /// <returns>成功返回刚刚插入信息的主键id 否则返回0</returns>
        public static int AddReCompany(ReCompany company)
        {
            int iExecute = 0;
            try
            {
                StringBuilder strSql = new StringBuilder();
                strSql.Append("insert into Approve_Company (");
                strSql.Append(" CompanyName,Address,CompanyRes,ResIdCard,CompanyScale,Tel1,Tel2,CompanyResPhoto,CompanyPhoto,Descibe,AddTime,TypeId,State");
                strSql.Append(") values(");
                strSql.Append("@CompanyName,@Address,@CompanyRes,@ResIdCard,@CompanyScale,@Tel1,@Tel2,@CompanyResPhoto,@CompanyPhoto,@Descibe,@AddTime,@TypeId,@State");
                strSql.Append(");select @@IDENTITY");
                SqlParameter[] para = new SqlParameter[]
                {
                new SqlParameter("@CompanyName",SqlDbType.NVarChar,100),
                new SqlParameter("@Address",SqlDbType.NVarChar,100),
                new SqlParameter("@CompanyRes",SqlDbType.NVarChar,50),
                new SqlParameter("@ResIdCard",SqlDbType.NVarChar,50),
                new SqlParameter("@CompanyScale",SqlDbType.NVarChar,50),
                new SqlParameter("@Tel1",SqlDbType.NVarChar,50),
                new SqlParameter("@Tel2",SqlDbType.NVarChar,50),
                new SqlParameter("@CompanyResPhoto",SqlDbType.NVarChar,100),
                new SqlParameter("@CompanyPhoto",SqlDbType.NVarChar,100),
                new SqlParameter("@Descibe",SqlDbType.NVarChar,200),
                new SqlParameter("@AddTime",SqlDbType.NVarChar,50),
                new SqlParameter("@TypeId",SqlDbType.Int),
                 new SqlParameter("@State",SqlDbType.Int),
                };
                para[0].Value = company.CompanyName;
                para[1].Value = company.Address;
                para[2].Value = company.CompanyRes;
                para[3].Value = company.ResIdCard;
                para[4].Value = company.CompanyScale;
                para[5].Value = company.Tel1;
                para[6].Value = company.Tel2;
                para[7].Value = company.CompanyPhotoPath;
                para[8].Value = company.CompanyResPhotoPath;
                para[9].Value = company.Descibe;
                para[10].Value = company.AddTime;
                para[11].Value = company.TypeId;
                para[12].Value = company.State;

                object obj = DbHelperSQL.GetSingle(strSql.ToString(), para);
                if (obj != null)
                {
                    iExecute = Convert.ToInt32(obj);
                }

            }
            catch (Exception e)
            {
                Log4Net.LogWrite("err", "Ctrl_Ass_ReCompany:AddReCompany" + e.Message);
            }
            return iExecute;
        }
Exemple #3
0
        /// <summary>
        /// 数据初始化绑定
        /// </summary>
        private void Bind()
        {
            #region 获取基本数据

            company = Ctrl_Ass_ReCompany.GetCompanyInfoByCompanyId(Id);

            #endregion

            #region 初始化申请人基本信息
            this.lbApproverName.Text = company.CompanyName;
            this.txtName.Text = company.CompanyRes;
            this.txtIdCard.Text = company.ResIdCard;
            this.txtAddress.Text = company.Address;
            this.txtTel1.Text = company.Tel1;
            this.txtTel2.Text = company.Tel2;
            this.imgPhoto.ImageUrl = company.CompanyPhotoPath;
            this.imgIdCard.ImageUrl = company.CompanyResPhotoPath;
            this.txtDoc.Value = company.Descibe;
            #endregion
        }
Exemple #4
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     ReCompany company = new ReCompany();
     if ((string.IsNullOrEmpty(photoLoc)) || (string.IsNullOrEmpty(idCardLoc)))
     {
         MessageBox.Show(this, "照片必须上传,检查照片上传情况");
         return;
     }
     company.CompanyName = this.txtName.Value.Trim();
     company.Address = this.txtAddress.Value.Trim();
     company.CompanyRes = this.txtRes.Value.Trim();
     company.ResIdCard = this.txtIdCard.Value.Trim();
     company.CompanyResPhotoPath = idCardLoc;
     company.CompanyPhotoPath = photoLoc;
     company.CompanyScale = this.txtScale.Value.Trim();
     company.Tel1 = this.txtTel1.Text.Trim();
     company.Tel2 = this.txtTel2.Text.Trim();
     company.Descibe = this.txtDoc.Value.Trim();
     company.TypeId = 1;
     company.State = 1;
     company.AddTime = DateTime.Now.ToString();
     int result = Ctrl_Ass_ReCompany.AddReCompany(company);
     if (result != 0)
     {
         Approve_Record appRecord = new Approve_Record();
         appRecord.UserId = 0;
         appRecord.EmployeeId = result;
         appRecord.TypeId = 20;
         appRecord.StepId = 4;
         int recordId = (Ctrl_Approve.AddRecord(appRecord));
         if (recordId == 0)
         {
             MessageBox.Show(this, "添加失败,审批记录表!");
             return;
         }
         else
         {
             Confirm confirm = new Confirm();
             confirm.Fid = 0;
             confirm.IdCard = company.ResIdCard;
             confirm.TypeId = 20;
             confirm.RecordId = recordId;
             confirm.ConfirmCode = Med_Ass.GenerateRandomNumber(6);
             if (CommonHelp.AddConfirm(confirm) == 0)
             {
                 MessageBox.Show(this, "插入验证码发生错误,联系管理员");
                 return;
             }
             else
             {
                 MessageBox.ShowAndRedirect(this, "添加成功,牢记查询码,供发布工作时使用" + confirm.ConfirmCode, "ZaiJiuYe_Main.aspx");
             }
         }
     }
     else
     {
         MessageBox.Show(this, "添加失败");
         return;
     }
 }
Exemple #5
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     ReCompany company = new ReCompany();
     if ((string.IsNullOrEmpty(photoLoc)) || (string.IsNullOrEmpty(idCardLoc)))
     {
         MessageBox.Show(this, "照片必须上传,检查照片上传情况");
         return;
     }
     company.CompanyName = this.txtName.Value.Trim();
     company.Address = this.txtAddress.Value.Trim();
     company.CompanyRes = this.txtRes.Value.Trim();
     company.ResIdCard = this.txtIdCard.Value.Trim();
     company.CompanyResPhotoPath = idCardLoc;
     company.CompanyPhotoPath = photoLoc;
     company.CompanyScale = this.txtScale.Value.Trim();
     company.Tel1 = this.txtTel1.Text.Trim();
     company.Tel2 = this.txtTel2.Text.Trim();
     company.Descibe = this.txtDoc.Value.Trim();
     company.TypeId = 0;
     company.State = 0;
     company.AddTime = DateTime.Now.ToString();
     int result = Ctrl_Ass_ReCompany.AddReCompany(company);
     if (result != 0)
     {
         Approve_Record appRecord = new Approve_Record();
         appRecord.UserId = 0;
         appRecord.CompanyId = result;
         appRecord.TypeId = 20;
         appRecord.StepId = 0;
         int recordId = (Ctrl_Approve.AddRecord(appRecord));
         if (recordId == 0)
         {
             MessageBox.Show(this, "添加失败,审批记录表!");
         }
         else
         {
             Confirm confirm = new Confirm();
             confirm.IdCard = company.ResIdCard;
             confirm.TypeId = 20;
             confirm.RecordId = recordId;
             confirm.ConfirmCode = Med_Ass.GenerateRandomNumber(6);
             confirm.Fid = 0;
             if (CommonHelp.AddConfirm(confirm) == 0)
             {
                 MessageBox.Show(this, "插入验证码发生错误,联系管理员");
                 return;
             }
             else
             {
                 MessageBox.ShowAndRedirect(this, "申请成功,请及时查询回馈信息,牢记下一页面的查询码,供查询使用:", "../Confirm.aspx?confirmCode=" + confirm.ConfirmCode);
             }
         }
         //Response.Write("<script>alert('添加成功" + result + "')</script>");
     }
     else
     {
         MessageBox.Show(this, "插入验证码发生错误,联系管理员");
         return;
     }
 }
Exemple #6
0
        /// <summary>
        /// 数据初始化绑定
        /// </summary>
        private void Bind()
        {
            #region 获取基本数据
            //AppRecord.StepId = int.Parse(Ctrl_Approve.GetRecordById(RecordId.ToString()).Tables[0].Rows[0]["StepId"].ToString());
            company = Ctrl_Ass_ReCompany.GetCompanyInfoByCompanyId(companyId);
            #endregion

            #region 初始化申请人基本信息
            this.lbCompanyName.Text = company.CompanyName;
            this.txtName.Text = company.CompanyRes;
            this.txtIdCard.Text = company.ResIdCard;
            this.txtAddress.Text = company.Address;
            this.txtTel1.Text = company.Tel1;
            this.txtTel2.Text = company.Tel2;
            this.imgPhoto.ImageUrl = company.CompanyPhotoPath;
            this.imgIdCard.ImageUrl = company.CompanyResPhotoPath;
            this.txtDoc.Value = company.Descibe;
            #endregion

            #region 初始化申请步骤及申请意见
            AppStep = Ctrl_Approve.GetAppStepById(RecordId);

            #endregion
        }
Exemple #7
0
        /// <summary>
        /// 根据法人身份证号码获取再就业招聘企业数据列表
        /// </summary>
        /// <param name="employeeId">企业表主键Id</param>
        /// <returns>招聘数据实体</returns>
        public static ReCompany GetCompanyInfoByIdCard(string idCard)
        {
            ReCompany company = new ReCompany();
            try
            {
                StringBuilder strSql = new StringBuilder();
                strSql.Append(" select * from Approve_Company ");
                strSql.Append(" where ResIdCard = " + idCard);
                DataSet ds = DbHelperSQL.Query(strSql.ToString());
                int count = ds.Tables[0].Rows.Count;
                if (count != 0)
                {

                    DataRow row = ds.Tables[0].NewRow();
                    row = ds.Tables[0].Rows[0];
                    company.Id = (int)row["Id"];
                    if (row["CompanyName"] != null && !string.IsNullOrEmpty((string)row["CompanyName"]))
                    {
                        company.CompanyName = (string)row["CompanyName"];
                    }
                    if (row["Address"] != null && !string.IsNullOrEmpty((string)row["Address"]))
                    {
                        company.Address = (string)row["Address"];
                    }
                    if (row["CompanyRes"] != null && !string.IsNullOrEmpty((string)row["CompanyRes"]))
                    {
                        company.CompanyRes = (string)row["CompanyRes"];
                    }
                    if (row["ResIdCard"] != null && !string.IsNullOrEmpty((string)row["ResIdCard"]))
                    {
                        company.ResIdCard = (string)row["ResIdCard"];
                    }
                    if (row["CompanyScale"] != null && !string.IsNullOrEmpty((string)row["CompanyScale"]))
                    {
                        company.CompanyScale = (string)row["CompanyScale"];
                    }
                    if (row["Tel1"] != null && !string.IsNullOrEmpty((string)row["Tel1"]))
                    {
                        company.Tel1 = (string)row["Tel1"];
                    }
                    if (row["Tel2"] != null && !string.IsNullOrEmpty((string)row["Tel2"]))
                    {
                        company.Tel2 = (string)row["Tel2"];
                    }
                    if (row["CompanyPhoto"] != null && !string.IsNullOrEmpty((string)row["CompanyPhoto"]))
                    {
                        company.CompanyPhotoPath = (string)row["CompanyPhoto"];
                    }
                    if (row["CompanyResPhoto"] != null && !string.IsNullOrEmpty((string)row["CompanyResPhoto"]))
                    {
                        company.CompanyResPhotoPath = (string)row["CompanyResPhoto"];
                    }
                    if (row["Descibe"] != null && !string.IsNullOrEmpty((string)row["Descibe"]))
                    {
                        company.Descibe = (string)row["Descibe"];
                    }
                    if (row["AddTime"] != null && !string.IsNullOrEmpty((string)row["AddTime"]))
                    {
                        company.AddTime = (string)row["AddTime"];
                    }
                    if (row["TypeId"] != null && !string.IsNullOrEmpty((string)row["TypeId"]))
                    {
                        company.TypeId = (int)row["TypeId"];
                    }
                    if (row["State"] != null && !string.IsNullOrEmpty((string)row["State"]))
                    {
                        company.State = (int)row["State"];
                    }
                }

            }
            catch (Exception e)
            {
                Log4Net.LogWrite("err", "Controler.Ctrl_Ass_ReCompany.GetCompanyInfoByIdCard:" + e.Message);
            }
            return company;
        }