Exemplo n.º 1
0
    private void InitModule()
    {
        if (Request["ID"] == null)
        {
            return;
        }

        int id = int.Parse(Request["ID"].ToString());

        txtID.Text = id.ToString();
        FineOffice.Modules.HR_Job model = jobBll.GetModel(d => d.ID == id);
        txtJob.Text        = model.Job;
        txtJobNO.Text      = model.JobNO;
        txtPinyinCode.Text = model.PinyinCode;
        txtRemark.Text     = model.Remark;
        chkStop.Checked    = model.Stop.Value;
    }
Exemplo n.º 2
0
 protected void btnSave_Click(object sender, EventArgs e)
 {
     FineOffice.Modules.HR_Job model = new FineOffice.Modules.HR_Job();
     model.JobNO      = txtJobNO.Text.Trim();
     model.Job        = txtJob.Text.Trim();
     model.PinyinCode = txtPinyinCode.Text.Trim();
     model.Remark     = txtRemark.Text.Trim();
     model.Stop       = chkStop.Checked;
     try
     {
         jobBll.Add(model);
         PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference("subwin_close"));
     }
     catch (Exception ex)
     {
         Alert.ShowInParent(ex.Message);
     }
 }