Example #1
0
    protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e)
    {
        if (e.CommandName == "Clear")
        {
            string idcard = e.CommandArgument.ToString();
            //ZwTpOperator.Delete(id);
            FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard);
            fso.KM3_VERIFY = "Y";
            // fso.FEE_VERIFY_DATE = DateTime.Now;
            //string idcard = fso.IDCARD.Trim('\'');
            fso.IDCARD = "'" + idcard + "'";
            if (SimpleOrmOperator.Delete(fso))
            {
                //fso.IDCARD = fso.IDCARD.Trim('\'');
                _FP.FpDeleteUser(idcard);
                if (fso.STATUE >= FpStudentObject.STATUE_KM3_ENTER)
                {
                    fso.IDCARD = idcard;
                    FpStudentCleared cleared = new FpStudentCleared(fso);
                    SimpleOrmOperator.Create(cleared);
                }
                WebTools.Alert(this, string.Format("{0}:{1}  学员记录删除成功!", fso.LSH, fso.NAME));
            }
            else
            {
                WebTools.Alert(this, string.Format("{0}:{1}  学员记录删除失败!", fso.LSH, fso.NAME));
            }

            this.ProcedurePager1.Changed = true;
        }
    }
Example #2
0
    protected void DataGrid1_ItemCommand(object source, DataGridCommandEventArgs e)
    {
        //allowcheck
        int id = Convert.ToInt32(e.CommandArgument);
        StudentApplyInfoChecked infoCheck = SimpleOrmOperator.Query<StudentApplyInfoChecked>(id);
        if (e.CommandName == "Delete")
        {

            if (infoCheck != null && infoCheck.Checked == 1)
            {
                WebTools.Alert(this, "已审核过的数据无法删除!");
            }
            else
            {
                SimpleOrmOperator.Delete(infoCheck);
                WebTools.Alert(this, "删除成功!");
                this.ProcedurePager1.Changed = true;
            }
        }
        else if (e.CommandName == "Detail")
        {
            //int id = Convert.ToInt32(e.CommandArgument);
            //this.Pop(id);
            StudentApplyInfo sai = SimpleOrmOperator.Query<StudentApplyInfo>(id);
            if (sai == null) return ;
            if (StudentApplyInfoOperator.CheckInfo(sai, this.Operator.OperatorName))
            {
                WebTools.Alert(string.Format("{0}:{1} 审核成功", sai.Xm, sai.Sfzmhm));
            }
            else {
                WebTools.Alert(string.Format("{0}:{1} 审核失败", sai.Xm, sai.Sfzmhm));
            }

        }
    }
Example #3
0
 protected void DataGrid1_ItemCommand1(object source, DataGridCommandEventArgs e)
 {
     if (e.CommandName == "Delete")
     {
         int id = Convert.ToInt32(e.CommandArgument);
         SimpleOrmOperator.Delete <ProductObject>(id);
         WebTools.Alert(this, "删除成功!");
         this.SimplePager1.Changed = true;
     }
     else if (e.CommandName == "Detail")
     {
         int id = Convert.ToInt32(e.CommandArgument);
         this.Pop(id);
     }
 }
Example #4
0
    protected void btnBatchClear_Click(object sender, EventArgs e)
    {
        IList <string> idcards  = new List <string>();
        int            checkNum = 0;
        int            reNum    = 0;

        foreach (DataGridItem item in DataGrid1.Items)
        {
            CheckBox cb = (CheckBox)item.FindControl("cbIdCard");
            if (cb.Checked)
            {
                idcards.Add(item.Cells[3].Text);
                checkNum++;
            }
        }

        if (checkNum == 0)
        {
            WebTools.Alert("没有记录被选中");
            return;
        }

        foreach (string idcard in idcards)
        {
            FpStudentObject fso = SimpleOrmOperator.Query <FpStudentObject>(idcard);
            //fso.KM3_VERIFY = "Y";
            //fso.FEE_VERIFY_DATE = DateTime.Now;
            // string idcard = fso.IDCARD.Trim('\'');
            fso.IDCARD = "'" + idcard + "'";
            if (SimpleOrmOperator.Delete(fso))
            {
                // fso.IDCARD = fso.IDCARD.Trim('\'');
                _FP.FpDeleteUser(idcard);
                if (fso.STATUE >= FpStudentObject.STATUE_KM3_ENTER)
                {
                    fso.IDCARD = idcard;
                    FpStudentCleared cleared = new FpStudentCleared(fso);
                    SimpleOrmOperator.Create(cleared);
                }
                reNum++;
            }
        }

        WebTools.Alert(string.Format("删除结果:选中{0}条记录,{1}条成功删除", checkNum, reNum));
        this.ProcedurePager1.Changed = true;
        txtQueryValue.Text           = "";
        txtQueryValue.Focus();
    }
Example #5
0
    public static bool Delete(int id)
    {
        YuyueInfo info = SimpleOrmOperator.Query <YuyueInfo>(id);

        if (info.Checked != 0)
        {
            return(false);
        }
        bool result = SimpleOrmOperator.Delete <YuyueInfo>(id);

        if (result)
        {
            if (!DataAccessFactory.GetDataAccess().ExecuteSql("update table_yuyue_limit set i_tpused_num=i_tpused_num-1 where i_tpused_num>0  and id=" + info.PaibanId))
            {
                DataAccessFactory.GetDataAccess().ExecuteSql("update table_yuyue_limit set i_used_num=i_used_num-1 where i_used_num>0 and id=" + info.PaibanId);
            }
        }
        return(result);
    }
Example #6
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <ZwTpObject>(id);
     // DataAccessFactory.GetDataAccess().ExecuteSql("delete from table_yuyue_limit where i_week_num=" + week.WeekNum);
 }
Example #7
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <DictType>(id);
 }
Example #8
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <CarOwnerInfoChange>(id);
 }
Example #9
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <PersonInfoChange>(id);
 }
Example #10
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <DepartMent>(id);
 }
Example #11
0
 public static void Delete(int id)
 {
     LogInfoOperator.LogSystem("删除用户", "删除用户ID为" + id + "的密码");
     SimpleOrmOperator.Delete <UserInfo>(id);
 }
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <StudentApplyInfo>(id);
 }
Example #13
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <YuyueDayLimit>(id);
 }
Example #14
0
 public static void Delete(int id)
 {
     LogInfoOperator.LogSystem("删除角色", "删除角色ID为" + id.ToString());
     SimpleOrmOperator.Delete <RoleInfo>(id);
 }
Example #15
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <SchoolCarInfo>(id);
 }
Example #16
0
 public static void Delete(int id)
 {
     SimpleOrmOperator.Delete <UserObject>(id);
 }
Example #17
0
 public static void Delete(int id)
 {
     LogInfoOperator.LogSystem("删除车管所部门", "删除车管所部门ID为" + id.ToString());
     SimpleOrmOperator.Delete <DepartmentInfo>(id);
 }