Beispiel #1
0
        public void OnSaveAccount(object sender)
        {
            Logger.InfoLog("AddAccountScreenViewModel::Entering OnSaveAccount");
            try
            {
                ArrayList ParamValues = new ArrayList();
                ParamValues.Add(0);
                ParamValues.Add(_AccountCode);
                ParamValues.Add(_AccountName);
                ParamValues.Add(_AliasName);
                ParamValues.Add(_SelectedAccountType);
                ParamValues.Add(_SelectedAccountStatus);
                ParamValues.Add(_SelectedAccountGroup);
                ParamValues.Add(false);
                ParamValues.Add(_CreditLimit);
                ParamValues.Add(_CreditDays);
                ParamValues.Add(_SelectedPurchaseAccount); //_SelectedPurchaseAccount


                ParamValues.Add(_Selected); //_SelectedSalesAccount
                if (_SelectedBillWise == "1")
                {
                    ParamValues.Add(true);
                }
                else
                {
                    ParamValues.Add(false);
                }
                ParamValues.Add("");
                ParamValues.Add("asdfasdfasdf");
                ParamValues.Add("Mukaram");
                ParamValues.Add(0);
                ParamValues.Add("");
                long ret = objControlGenerator.AddAccountDetails(ParamValues, 1);

                if (ret > 0)
                {
                    _MessageVisibility = true;
                    _DisplayMessage    = "Account Added!  " + ret.ToString();
                }
                else
                {
                    _MessageVisibility = true;
                    _DisplayMessage    = ret.ToString();
                }

                OnPropertyChanged("MessageVisibility");
                OnPropertyChanged("DisplayMessage");
                OnPropertyChanged("AccountName");
                Logger.InfoLog("AddAccountScreenViewModel::Exiting OnSaveAccount");
            }
            catch (Exception ex)
            {
                Logger.ErrorLog("AddAccountScreenViewModel:: OnSaveAccount" + ex.StackTrace.ToString());
            }
        }
Beispiel #2
0
        public void OnSaveAccount(object sender)
        {
            Logger.InfoLog("AddAccountScreenViewModel::Entering OnSaveAccount");
            try
            {
                ArrayList ParamValues = new ArrayList();
                ParamValues.Add(0);
                ParamValues.Add(_AccountCode);
                ParamValues.Add(_AccountName);
                //ParamValues.Add(_PACTControlData.Count);
                ParamValues.Add(_AliasName);
                ParamValues.Add(_SelectedAccountType);
                ParamValues.Add(_SelectedAccountStatus);
                ParamValues.Add(_SelectedAccountGroup);
                ParamValues.Add(false);
                ParamValues.Add(_CreditDays);
                ParamValues.Add(_CreditLimit);
                ParamValues.Add(_SelectedPurchaseAccount[0]); //_SelectedPurchaseAccount
                ParamValues.Add(_SelectedSalesAccount[0]);    //_SelectedSalesAccount
                if (_SelectedBillWise == "1")
                {
                    ParamValues.Add(true);
                }
                else
                {
                    ParamValues.Add(false);
                }
                ParamValues.Add("GUID");
                ParamValues.Add("asdfasdfasdf");
                ParamValues.Add("Mukaram");
                ParamValues.Add("asdfasfdasFD");

                string contacts = @"<ContactsXML><Row AddressTypeID =""1"" ContactName =""name"" Address1=""addr1""  Address2 =""Address2"" ContactName =""name"" Address3=""Address3""  City =""City"" State =""State"" Zip=""Zip"" Country=""Country"" Phone1=""Phone1"" Phone2=""Phone2"" @Fax=""Fax""  Email1=""Email1"" Email2=""Email2"" />";

                string attachments = @"<XML><Row FilePath=""FilePath"" ActualFileName=""ActualFileName"" RelativeFileName=""RelativeFileName"" FileExtension=""FileExtension"" IsProductImage=""IsProductImage"" /></XML>";

                ParamValues.Add("");
                ParamValues.Add("");
                ParamValues.Add(1);
                long ret = objControlGenerator.AddAccountDetails(ParamValues, 1);

                if (ret > 0)
                {
                    _MessageVisibility = true;
                    _DisplayMessage    = "Account Added!  " + ret.ToString();
                }
                else
                {
                    _MessageVisibility = true;
                    _DisplayMessage    = ret.ToString();
                }

                OnPropertyChanged("MessageVisibility");
                OnPropertyChanged("DisplayMessage");
                OnPropertyChanged("AccountName");
                Logger.InfoLog("AddAccountScreenViewModel::Exiting OnSaveAccount");
            }
            catch (Exception ex)
            {
                Logger.ErrorLog("AddAccountScreenViewModel:: OnSaveAccount" + ex.StackTrace.ToString());
            }
        }