public bool Find(int FundMasterId)
        {
            d = toList.Where(x => x.FundMasterId == FundMasterId).FirstOrDefault();

            if (d != null)
            {
                d.toCopy <CustomFormat>(this);
                //IsReadOnly = !UserPermission.AllowUpdate;

                return(true);
            }

            return(false);
        }
        public static void SetDataFormat()
        {
            CustomFormat V = new CustomFormat();

            V.Find(UserAccount.User.UserType.FundMasterId);

            Common.AppLib.CurrencyPositiveSymbolPrefix = V.CurrencyPositiveSymbolPrefix;
            Common.AppLib.CurrencyPositiveSymbolSuffix = V.CurrencyPositiveSymbolSuffix;

            Common.AppLib.CurrencyToWordPrefix      = V.CurrencyToWordPrefix;
            Common.AppLib.CurrencyToWordSuffix      = V.CurrencyToWordSuffix;
            Common.AppLib.DecimalToWordPrefix       = V.DecimalToWordPrefix;
            Common.AppLib.DecimalToWordSuffix       = V.DecimalToWordSuffix;
            Common.AppLib.IsDisplayWithOnlyOnSuffix = V.IsDisplayWithOnlyOnSuffix;
        }
Exemple #3
0
        public bool Find(int CompanyId)
        {
            int CId;

            if (BLL.UserAccount.User.UserType.Company.CompanyType == "Warehouse" || BLL.UserAccount.User.UserType.Company.CompanyType == "Dealer")
            {
                CId = (int)BLL.UserAccount.User.UserType.Company.UnderCompanyId;
                d   = toList.Where(x => x.CompanyId == CId).FirstOrDefault();
            }
            else
            {
                d = toList.Where(x => x.CompanyId == CompanyId).FirstOrDefault();
            }
            if (d != null)
            {
                d.toCopy <CustomFormat>(this);
                //IsReadOnly = !UserPermission.AllowUpdate;

                return(true);
            }

            return(false);
        }
        public bool Save(bool isServerCall = false)
        {
            try
            {
                CustomFormat d = toList.Where(x => x.Id == Id).FirstOrDefault();

                if (d == null)
                {
                    d = new CustomFormat();
                    toList.Add(d);
                }

                this.toCopy <CustomFormat>(d);
                if (isServerCall == false)
                {
                    var i = NubeAccountClient.NubeAccountHub.Invoke <int>("CustomFormat_Save", this).Result;
                    d.Id = i;
                }
                SetDataFormat();
                return(true);
            }
            catch (Exception ex) { }
            return(false);
        }