Created
August 11, 2022 10:41
-
-
Save bayramcetin/f57d40f92142577d5f733bc3ff4a14e8 to your computer and use it in GitHub Desktop.
Change company
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ETGInventModelGroupUpdate | |
{ | |
/// <summary> | |
/// Runs the class with the specified arguments. | |
/// </summary> | |
/// <param name = "_args">The specified arguments.</param> | |
public static void main(Args _args) | |
{ | |
CompanyInfo companyInfo; | |
InventModelGroup inventModelGroup; | |
Dialog dialog = new Dialog("Hizmet olanları güncelle"); | |
DialogField field = dialog.addField(extendedTypeStr(InventModelGroupId)); | |
DialogField field2 = dialog.addField(extendedTypeStr(InventLocationId)); | |
if(dialog.run()) | |
{ | |
if (!field.value()) | |
throw warning("Model grubu seçiniz."); | |
InventModelGroupId inventModelGroupId = field.value(); | |
InventLocationId inventLocationId = field2.value(); | |
while select DataArea from companyInfo | |
{ | |
changecompany(companyInfo.DataArea) | |
{ | |
inventModelGroup = InventModelGroup::find(inventModelGroupId, true); | |
if(inventModelGroup) | |
{ | |
ttsbegin; | |
inventModelGroup.ETGIsService = true; | |
if(inventLocationId) | |
{ | |
inventModelGroup.ETGInventLocationId = inventLocationId; | |
} | |
inventModelGroup.update(); | |
ttscommit; | |
} | |
} | |
} | |
Info("Güncelleme bitti."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment