コード例 #1
0
        private void LoadData()
        {
            isInLoadData = true;

            this.Title = Caption;
            dtDocumentDate.Focus();

            vw.CreateDefaultValue();
            CUtil.EnableForm(false, this);

            if (Mode.Equals("E"))
            {
                CTable m = OnixWebServiceAPI.GetAccountDocInfo(actualView.GetDbObject());
                if (m != null)
                {
                    vw.SetDbObject(m);
                    vw.NotifyAllPropertiesChanged();
                }
            }

            else if (Mode.Equals("A"))
            {
                vw.DocumentDate = DateTime.Now;
                vw.DocumentType = ((int)dt).ToString();

                vw.AllowCashNegative      = CGlobalVariable.IsCashNegativeAllow();
                vw.AllowARAPNegative      = CGlobalVariable.IsArApNegativeAllow();
                vw.AllowInventoryNegative = CGlobalVariable.IsInventoryNegativeAllow();
            }

            vw.IsModified = false;
            isInLoadData  = false;

            CUtil.EnableForm(true, this);
        }
コード例 #2
0
        private void LoadData()
        {
            isInLoadData = true;

            this.Title = Caption;
            dtFromDate.Focus();

            vw.CreateDefaultValue();

            CUtil.EnableForm(false, this);

            if (Mode.Equals("E"))
            {
                CTable m = getDocInfoWrapper();
                if (m != null)
                {
                    vw.SetDbObject(m);
                    vw.InitAccountDocItem();
                    vw.InitAccountDocPayment();
                    String tmp = vw.EntityAddressID;
                    vw.InitEntityAddresses();
                    vw.EntityAddressID = tmp;
                    vw.AddressObj      = CUtil.MasterIDToObject(vw.EntityAddresses, vw.EntityAddressID);

                    vw.BillSimulate.InitPromotionItems();
                    vw.BillSimulate.InitSelectedItems();

                    vw.NotifyAllPropertiesChanged();
                }

                vw.IsModified = false;
            }
            else if (Mode.Equals("A"))
            {
                vw.DocumentDate           = DateTime.Now;
                vw.VAT_PCT                = CGlobalVariable.GetGlobalVariableValue("VAT_PERCENTAGE");
                vw.VATType                = CGlobalVariable.GetGlobalVariableValue("DEFAULT_VAT_TYPE_SALE");
                vw.AllowCashNegative      = CGlobalVariable.IsCashNegativeAllow();
                vw.AllowARAPNegative      = CGlobalVariable.IsArApNegativeAllow();
                vw.AllowInventoryNegative = CGlobalVariable.IsInventoryNegativeAllow();

                vw.IsModified = (actualView != null);
            }


            isInLoadData = false;

            CUtil.EnableForm(true, this);
        }
コード例 #3
0
        private void LoadData()
        {
            isInLoadData = true;

            this.Title = Caption;
            dtFromDate.Focus();

            vw.CreateDefaultValue();

            CUtil.EnableForm(false, this);

            if (Mode.Equals("E"))
            {
                //CTable m = OnixWebServiceAPI.GetAccountDocInfo(actualView.GetDbObject());
                CTable m = getDocInfoWrapper();
                if (m != null)
                {
                    vw.SetDbObject(m);
                    vw.InitAccountDocReceipt();
                    vw.InitAccountDocPayment();
                    String tmp = vw.EntityAddressID;
                    vw.InitEntityAddresses();
                    vw.EntityAddressID = tmp;
                    vw.AddressObj      = CUtil.MasterIDToObject(vw.EntityAddresses, vw.EntityAddressID);

                    vw.NotifyAllPropertiesChanged();
                }
            }
            else if (Mode.Equals("A"))
            {
                vw.DocumentDate           = DateTime.Now;
                vw.VAT_PCT                = CGlobalVariable.GetGlobalVariableValue("VAT_PERCENTAGE");;
                vw.AllowCashNegative      = CGlobalVariable.IsCashNegativeAllow();
                vw.AllowARAPNegative      = CGlobalVariable.IsArApNegativeAllow();
                vw.AllowInventoryNegative = CGlobalVariable.IsInventoryNegativeAllow();
                vw.IsWhPayType1           = true;
            }

            vw.IsModified = false;
            isInLoadData  = false;

            CUtil.EnableForm(true, this);
        }