protected void Page_Load(object sender, EventArgs e)
 {
     theStaff = (staff)Session["Staff"];
     System.Diagnostics.Debug.WriteLine("staff id " + theStaff.staffId);
     hisShop = DBModel.sharedDBModel().findShopByShopId(theStaff.shopId);
 }
        /*
         * 5.增加新门店
         * 参数:店长id,新门店地址,新门店电话
         * 返回值:门店实例,失败返回null
         */
        public shop addNewShopWithManagerIdAndAddressIdAndShopPhone(string newShopManagerId, string newShopAddress, string newShopPhone)
        {
            
            //写入数据库
            using (YMDBEntities db = new YMDBEntities())
            {
                System.Diagnostics.Debug.WriteLine("lalalalalasdk:" + newShopAddress);
                shop newShop = new shop
                {
                    shopAddress = newShopAddress,
                    shopPhone = newShopPhone,
                    shopId = createNewId("shop"),
                    shopStatus = 1,
                };
                try
                {
                    System.Diagnostics.Debug.WriteLine("shop0Id:" + newShop.shopAddress);
                    db.shop.Add(newShop);
                    db.SaveChanges();
                }
                catch (Exception ex)
                {
                    System.Diagnostics.Debug.WriteLine("Address输入有误.");
                    System.Diagnostics.Debug.WriteLine(ex.Message);
                    return null;
                }
                return newShop;
            }

           
        }