예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int intAdminId = HelperUtility.hasPurviewPage("CheckoutContract_add");
         ViewState["AdminId"] = intAdminId;
         BllDepartment.bindRPT(rptName);
         if (HelperUtility.hasPurviewPage("SUPERADMIN") > 0)
         {
             cbFlag.Visible = true;
         }
     }
 }
예제 #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         int intAdminId = HelperUtility.hasPurviewPage("CheckoutContract_update");
         ViewState["AdminId"] = intAdminId;
         // 本页只能从list.aspx的编辑页转过来
         // 因此要得到要修改的id值和页面的page值用于修改成功后返回
         int intId = HelperUtility.getQueryInt("id");
         ViewState["id"] = intId;
         int intPage = HelperUtility.getQueryInt("page");
         ViewState["page"] = intPage;
         if (HelperUtility.hasPurviewPage("SUPERADMIN") > 0)
         {
             cbFlag.Visible = true;
         }
         // 根据入库单id查询得到入库单model
         ModelCheckoutContract model        = BllCheckoutContract.getById(intId);
         List <string>         listUnitName = model.name_unit.Split(',').ToList();
         if (!"".Equals(listUnitName[0]))
         {
             cbUnitName1.Checked = true;
         }
         if (!"".Equals(listUnitName[1]))
         {
             cbUnitName2.Checked = true;
         }
         tbDepartmentName.Value = model.name_department;
         tbSignName.Value       = model.name_sign;
         tbTimeCreate.Value     = model.time_create.ToString("yyyy-MM-dd");
         tbComment.Text         = model.comment;
         if (model.flag > 0)
         {
             cbFlag.Checked = true;
         }
         BllDepartment.bindRPT(rptName);
     }
 }