This commit is contained in:
@@ -2366,6 +2366,21 @@ namespace GZTW.AyaNova.BLL
|
||||
/*Custom fields*/
|
||||
mCustom1,mCustom2,mCustom3,mCustom4,mCustom5,mCustom6,mCustom7,mCustom8,mCustom9,mCustom0));
|
||||
|
||||
//case 3701 set pm's inactive if client is now inactive
|
||||
if (this.mActiveChanged && this.mActive == false)
|
||||
{
|
||||
//here set all pm's for this client to inactive
|
||||
DBCommandWrapper cmPM = DBUtil.GetCommandFromSQL(
|
||||
"update AWORKORDERPREVENTIVEMAINTENANCE set aactive = 0 from AWORKORDERPREVENTIVEMAINTENANCE " +
|
||||
"LEFT OUTER JOIN AWORKORDER ON (AWORKORDERPREVENTIVEMAINTENANCE.AWORKORDERID=AWORKORDER.AID) " +
|
||||
"WHERE AWORKORDER.AWORKORDERTYPE='2' and aworkorder.ACLIENTID=@CLIENTID "
|
||||
);
|
||||
cmPM.AddInParameter("@CLIENTID", DbType.Guid, mID);
|
||||
DBUtil.DB.ExecuteNonQuery(cmPM, transaction);
|
||||
|
||||
}
|
||||
|
||||
|
||||
MarkOld();//db is now synched with object
|
||||
|
||||
// Commit the transaction
|
||||
@@ -2398,15 +2413,7 @@ namespace GZTW.AyaNova.BLL
|
||||
//in use AyaBizUtils.MRU.Save();
|
||||
}
|
||||
|
||||
//case 3701 set pm's inactive if client is now inactive
|
||||
if (this.mActiveChanged && this.mActive == false)
|
||||
{
|
||||
//here set all pm's for this client to inactive
|
||||
/* "update AWORKORDERPREVENTIVEMAINTENANCE set aactive = 1 from AWORKORDERPREVENTIVEMAINTENANCE "+
|
||||
"LEFT OUTER JOIN AWORKORDER ON (AWORKORDERPREVENTIVEMAINTENANCE.AWORKORDERID=AWORKORDER.AID) "+
|
||||
"WHERE AWORKORDER.AWORKORDERTYPE='2' and aworkorder.ACLIENTID=@ID " */
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Process events as necessary
|
||||
if (AyaBizUtils.GlobalSettings.UseNotification)//Case 510
|
||||
|
||||
Reference in New Issue
Block a user