Пример #1
0
 /// <summary>
 /// 恢复IC卡
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnHF_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidCValue.Value))
         {
             this.PrintfError("没有选择要修改的纪录!");
             return;
         }
         string icflag = ICParam.GetFlag(this.hidCValue.Value);
         if (icflag == "使用")
         {
             this.PrintfError("此卡是使用状态,不必恢复!");
             return;
         }
         else
         {
             ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]);
             ICParam parm = new ICParam();
             parm.Update(this.hidCValue.Value, "使用", DBNull.Value.ToString(), DateTime.MinValue);
             InitICPassHid();
             BindICByEnter();
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }
Пример #2
0
 /// <summary>
 /// 挂失IC卡
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void btnGS_Click(object sender, ImageClickEventArgs e)
 {
     try
     {
         if (string.IsNullOrEmpty(this.hidCValue.Value))
         {
             this.PrintfError("没有选择要修改的纪录!");
             return;
         }
         string icflag = ICParam.GetFlag(this.hidCValue.Value);
         if (icflag == "挂失")
         {
             this.PrintfError("此卡是挂失状态,不能重复挂失!");
             return;
         }
         else
         {
             ACCTRUE.WMSBLL.Model.User user = (ACCTRUE.WMSBLL.Model.User)(Session[Config.Curren_User]);
             ICParam parm = new ICParam(this.hidCValue.Value, this.hidCValue.Value, "", "", this.txtKHName.Text, "挂失", this.txtCPH.Text, "", DateTime.Now, user.UserID, DateTime.Now, "");
             parm.Update(this.hidCValue.Value, "挂失", user.UserID, DateTime.Now);
             InitICPassHid();
             BindICByEnter();
         }
     }
     catch (Exception ex)
     {
         String strEx = ex.Message;
         this.PrintfError("数据访问错误,请重试!");
         return;
     }
 }