Пример #1
0
 /// <summary>
 /// 关闭/开启自定义表单
 /// </summary>
 public int DelFormInfo(FormInfoDel Model)
 {
     MySqlConnection conn = DbMySqlConnectionWrite();
     int iBack = 0;
     try
     {
         iBack = conn.Update("FormInfo")
                 .Set("T_Deleted", DbType.Int32, Model.Status)
                 .Set("T_Updater", DbType.AnsiString, Model.OperatorID)
                 .Set("T_UpdaterName", DbType.AnsiString, Model.OperatorName)
                 .Set("T_UpdateTime", DbType.AnsiString, Model.OperateTime)
                 .Where(WhereMySQL.Equal("PK_Form", DbType.AnsiString, Model.ID))
                 .Execute();
         return iBack;
     }
     catch
     {
         return 0;
     }
 }
Пример #2
0
 public DataResult EditFormInfoStatus(FormInfoDel Model)
 {
     //BForm bWorkOrder = new BForm();
     UserInfo mUser = BusinessConst.GetDefault();
     Model.OperatorID = mUser.ID;
     Model.OperatorName = mUser.Name;
     Model.OperateTime = DateTime.Now;
     int iBack = formService.DelFormInfo(Model);
     if (iBack == 1)
     {
         dataResult.Code = ResponseStatusCode.Success;
         dataResult.Msg = "操作成功!";
     }
     else
     {
         dataResult.Code = ResponseStatusCode.Error;
         dataResult.Msg = "操作失败!";
     }
     return dataResult;
 }