private void AfterStatus() { string strid = StringTrim(Request.Form["id"]); int id = Convert.ToInt32(strid); string strstatus = StringTrim(Request.Form["status"]); ChkAdminLevel("users", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.car_other_costbll bll = new BLL.car_other_costbll(); DTcms.Model.car_other_costinfo record = bll.GetModel(id); int iresult = 0; string strupdate = "Status=1,Checker_Code='" + admin_info.user_name + "',Check_Time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss") + "'"; iresult = bll.UpdateField(id, strupdate); ResultView view = new ResultView(); view.putData("result", iresult); outResult(view); }
private void AfterStatus() { string strid = StringTrim(Request.Form["id"]); int id = Convert.ToInt32(strid); string strstatus = StringTrim(Request.Form["status"]); ChkAdminLevel("users", DTEnums.ActionEnum.Delete.ToString()); //检查权限 BLL.car_use_recordbll bll = new BLL.car_use_recordbll(); DTcms.Model.car_use_recordinfo record = bll.GetModel(id); int iresult = 0; if (record.Status < 2) { string strupdate = "Status=2,Checker_Code='" + admin_info.user_name + "',Check_Time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss") + "'"; iresult = bll.UpdateField(id, strupdate); } else if (record.Status == 2) { string strupdate = "Status=4,Update_Time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss") + "'"; iresult = bll.UpdateField(id, strupdate); BLL.carbll cbll = new BLL.carbll(); cbll.UpdateField(record.Car.Car_Number, "Status=1"); } //else if (record.Status == 4) //{ // string strupdate = "Status=5,Update_Time='" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:sss") + "'"; // iresult = bll.UpdateField(id, strupdate); // BLL.carbll cbll = new BLL.carbll(); // cbll.UpdateField(record.Car.Car_Number, "Status=0"); //} if (iresult > 0) { //JscriptMsg("车辆状态修改成功!", Utils.CombUrlTxt("car_use_record_list.aspx", "group_id={0}&keywords={1}", // this.group_id.ToString(), this.keywords), "Success"); } ResultView view = new ResultView(); view.putData("result", iresult); outResult(view); }