public static string GetStoreName(int SupplierId)
        {
            StoreManagementDao SupplierDao  = new StoreManagementDao();
            string             supplierName = SupplierDao.GetStoreName(SupplierId);

            return(supplierName);
        }
        public static bool DeleteStore(int StoreId)
        {
            //ManagerHelper.CheckPrivilege(Privilege.DeleteProductType);
            bool flag = new StoreManagementDao().DeleteStore(StoreId);

            if (flag)
            {
                EventLogs.WriteOperationLog(Privilege.SupplierDelete, string.Format(CultureInfo.InvariantCulture, "删除了编号为”{0}”的门店", new object[]
                {
                    StoreId
                }));
            }
            return(flag);
        }
        public static int AddStore(StoreManagementInfo supplierInfo)
        {
            int result;

            if (supplierInfo == null)
            {
                result = 0;
            }
            else
            {
                StoreManagementDao SupplierDao = new StoreManagementDao();
                Globals.EntityCoding(supplierInfo, true);
                int num = SupplierDao.AddStore(supplierInfo);
                if (num > 0)
                {
                    EventLogs.WriteOperationLog(Privilege.StoreAdd, string.Format(CultureInfo.InvariantCulture, "创建了一个新的门店:”{0}”", new object[]
                    {
                        supplierInfo.StoreName
                    }));
                }
                result = num;
            }
            return(result);
        }
        public static bool UpdateStore(StoreManagementInfo supplierInfo)
        {
            bool result;

            if (supplierInfo == null)
            {
                result = false;
            }
            else
            {
                StoreManagementDao SupplierDao = new StoreManagementDao();
                Globals.EntityCoding(supplierInfo, true);
                bool flag = SupplierDao.UpdateStore(supplierInfo);
                if (flag)
                {
                    EventLogs.WriteOperationLog(Privilege.SupplierEdit, string.Format(CultureInfo.InvariantCulture, "修改了编号为”{0}”的门店", new object[]
                    {
                        supplierInfo.StoreId
                    }));
                }
                result = flag;
            }
            return(result);
        }