1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
| nomVarBOdoc = boDoc.Variables.get_Item(i).Name;
string message, title, defaultValue;
object myValue;
message = "Entrer valeur pour: " + nomVarBOdoc;
title = "Saisie des Valeurs";
string messageInviteInconnu = "Invite inconnu: " + nomVarBOdoc;
defaultValue = null;
lblSuiviOp.Text = lblSuiviOp.Text + " pour la société: " + nomSociete;
switch (nomVarBOdoc)
{
case inviteSociete ://"Code Société (00)"
case inviteSocieteProcStock:
case inviteS0:
case inviteS1:
case inviteS5:
case inviteSoc:
case inviteSocQu:
defaultValue = numSociete;
myValue = defaultValue; //Microsoft.VisualBasic.Interaction.InputBox(message, title, defaultValue, -1, -1);
boDoc.Variables.get_Item(i).Value = myValue.ToString();
break;
case inviteDateSitu://"Date de situation (JJ/MM/AAAA)"
case inviteDateSituProcStock:
case inviteDateSitu1:
defaultValue = mtxtDateSitu.Text;
myValue = defaultValue;// Microsoft.VisualBasic.Interaction.InputBox(message, title, defaultValue, -1, -1);
boDoc.Variables.get_Item(i).Value = myValue.ToString();
break;
case inviteAnneeComp3:
case inviteAnneeExo1:
case inviteAnneeExoComp6:
defaultValue = dateDeSituation.Year.ToString();
myValue = defaultValue.ToString();
boDoc.Variables.get_Item(i).Value = myValue.ToString();
break;
case inviteMoisSitu2:
case inviteMoisSitu3:
defaultValue = dateDeSituation.ToString("MM");
myValue = defaultValue.ToString();
boDoc.Variables.get_Item(i).Value = myValue.ToString();
break;
case inviteMoisComp4:
case inviteMoisComp5:
int moisSitu=dateDeSituation.Month;
int moisPrecedent=moisSitu-1;
defaultValue = moisPrecedent.ToString();
myValue = defaultValue.ToString();
boDoc.Variables.get_Item(i).Value = myValue.ToString();
break;
case inviteDelaiJour:
int jour = dateDeSituation.Day;
defaultValue = jour.ToString();
myValue = defaultValue.ToString();
boDoc.Variables.get_Item(i).Value = myValue.ToString();
break;
default:
myValue = Microsoft.VisualBasic.Interaction.InputBox(messageInviteInconnu, title, defaultValue, -1, -1);
boDoc.Variables.get_Item(i).Value = myValue.ToString();
break;
} |
Partager