Example #1
0
        /// <summary>
        /// 删除所有的过期订单
        /// </summary>
        /// <returns></returns>
        public int Delete_OverTime(int ShopID)
        {
            TimeSpan TS_Now = new TimeSpan(DateTime.Now.Ticks);

            List <Car_Order>    List_CarOrder = DB_CarOrder.Select(P => new TimeSpan(P.Order_Time.Ticks).Subtract(TS_Now).Duration().Days >= 2 && P.Order_Shop == ShopID).ToList();
            List <Car_Checkout> List_Check    = new List <Car_Checkout>();

            foreach (Car_Order temp in List_CarOrder)
            {
                List_Check.Add(DB_Checkout.Select(P => P.Checkout_Order == temp.Order_ID).SingleOrDefault());
            }


            if (DB_Checkout.Delete_ALL(List_Check))
            {
                foreach (Car_Order temp in List_CarOrder)
                {
                    DB_CarOrder.Delete(temp);
                }
                return(List_Check.Count());
            }
            else
            {
                foreach (Car_Checkout Temp in List_Check)
                {
                    DB_Checkout.Insert(Temp);
                }
                return(0);
            }
        }
Example #2
0
        /// <summary>
        /// 将员工开除出店铺
        /// </summary>
        /// <param name="UserID">用户ID</param>
        /// <returns></returns>
        public bool UserDropShop_UserID(Guid UserID)
        {
            UserInShop new_UIS;

            try
            {
                new_UIS = DB_UserInShop.Select(P => P.UserID == UserID).Single();
            }
            catch (Exception)
            {
                return(true);
            }
            return(DB_UserInShop.Delete(new_UIS));
        }
Example #3
0
        public bool DropUser(String UserName)
        {
            aspnet_UsersEX userEX = DB_UserEX.Select(P => P.User_ID == (Guid)Membership.GetUser(UserName).ProviderUserKey).Single();

            if (DB_UserEX.Delete(userEX))
            {
                Membership.DeleteUser(UserName);
                return(true);
            }
            else
            {
                DB_UserEX.Insert(userEX);
                return(false);
            }
        }
Example #4
0
        /// <summary>
        /// 删除省份信息
        /// </summary>
        /// <param name="Province">要删除的省份实体</param>
        /// <returns></returns>
        public bool DeleteProvince(int ProvinceID)
        {
            Car_Province Provin = DB_Province.Select(P => P.Province_ID == ProvinceID).Single();

            return(DB_Province.Delete(Provin));
        }
Example #5
0
        /// <summary>
        /// 删除收款单信息
        /// </summary>
        /// <param name="Checkout">要删除的收款单实体</param>
        /// <returns></returns>
        public bool DeleteCheckout(int CheckoutID)
        {
            Car_Checkout Che = DB_Checkout.Select(P => P.Checkout_ID == CheckoutID).Single();

            return(DB_Checkout.Delete(Che));
        }
Example #6
0
        /// <summary>
        /// 删除工资领取状况信息
        /// </summary>
        /// <param name="SalaryLog">要删除的工资领取状况实体</param>
        /// <returns></returns>
        public bool DeleteSalaryLog(int SalaryLogID)
        {
            User_SalaryLog SL = DB_SalaryLog.Select(P => P.SalaryLog_ID == SalaryLogID).Single();

            return(DB_SalaryLog.Delete(SL));
        }
Example #7
0
        /// <summary>
        /// 删除员工工资情况信息
        /// </summary>
        /// <param name="Salary">要删除的员工工资情况实体</param>
        /// <returns></returns>
        public bool DeleteSalary(int SalaryID)
        {
            User_Salary Sala = DB_Salary.Select(P => P.Salary_ID == SalaryID).Single();

            return(DB_Salary.Delete(Sala));
        }
Example #8
0
        /// <summary>
        /// 删除员工奖惩方案信息
        /// </summary>
        /// <param name="RAP">要删除的员工奖惩方案实体</param>
        /// <returns></returns>
        public bool DeleteRAP(int RAPID)
        {
            User_RAP rap = DB_RAP.Select(P => P.RAP_ID == RAPID).Single();

            return(DB_RAP.Delete(rap));
        }
Example #9
0
 /// <summary>
 /// 删除活动信息
 /// </summary>
 /// <param name="Action">要删除的活动实体</param>
 /// <returns></returns>
 public bool DeleteAction(Car_Action Action)
 {
     DB_Action.Delete(Action);
     return(DB_Action.SubmitChanges());
 }
Example #10
0
 /// <summary>
 /// 删除店铺信息
 /// </summary>
 /// <param name="ShopID">要删除的店铺ID</param>
 /// <returns></returns>
 public bool DeleteShop(int ShopID)
 {
     DB_Shop.Delete(DB_Shop.Select(P => P.Shop_ID == ShopID).Single());
     return(DB_Shop.SubmitChanges());
 }
Example #11
0
        /// <summary>
        /// 删除活动信息
        /// </summary>
        /// <param name="Action">要删除的活动实体</param>
        /// <returns></returns>
        public bool DeleteAction(int ActionID)
        {
            Car_Action Act = DB_Action.Select(P => P.Action_ID == ActionID).Single();

            return(DB_Action.Delete(Act));
        }
Example #12
0
        /// <summary>
        /// 删除资金变动信息
        /// </summary>
        /// <param name="Account">要删除的资金变动实体</param>
        /// <returns></returns>
        public bool DeleteAccount(int AccountID)
        {
            Car_Account Acc = DB_Account.Select(P => P.Account_ID == AccountID).Single();

            return(DB_Account.Delete(Acc));
        }
Example #13
0
        /// <summary>
        /// 删除城市信息
        /// </summary>
        /// <param name="City">要删除的城市实体</param>
        /// <returns></returns>
        public bool DeleteCity(int CityID)
        {
            Car_City Cit = DB_City.Select(P => P.City_ID == CityID).Single();

            return(DB_City.Delete(Cit));
        }
Example #14
0
        /// <summary>
        /// 删除员工制度奖惩情况信息
        /// </summary>
        /// <param name="WorkRAP">要删除的员工制度奖惩情况实体</param>
        /// <returns></returns>
        public bool DeleteWorkRAP(int WorkRAPID)
        {
            User_WorkRAP WRAP = DB_WorkRAP.Select(P => P.WorkRAP_ID == WorkRAPID).Single();

            return(DB_WorkRAP.Delete(WRAP));
        }
Example #15
0
        /// <summary>
        /// 删除车型信息
        /// </summary>
        /// <param name="Type">要删除的车型实体</param>
        /// <returns></returns>
        public bool DeleteType(int TypeID)
        {
            Car_Type typ = DB_Type.Select(P => P.Type_ID == TypeID).Single();

            return(DB_Type.Delete(typ));
        }
Example #16
0
        /// <summary>
        /// 删除资金变动信息
        /// </summary>
        /// <param name="CarGet">要删除的资金变动实体</param>
        /// <returns></returns>
        public bool DeleteCarGet(int CarGetID)
        {
            Car_Get CarGet = DB_CarGet.Select(P => P.GetCar_ID == CarGetID).Single();

            return(DB_CarGet.Delete(CarGet));
        }
Example #17
0
        /// <summary>
        /// 删除员工额外奖惩情况信息
        /// </summary>
        /// <param name="SalaryAppend">要删除的员工额外奖惩情况实体</param>
        /// <returns></returns>
        public bool DeleteSalaryAppend(int SalaryAppendID)
        {
            User_SalaryAppend SA = DB_SalaryAppend.Select(P => P.SalaryAppend_ID == SalaryAppendID).Single();

            return(DB_SalaryAppend.Delete(SA));
        }
Example #18
0
        /// <summary>
        /// 删除订单信息
        /// </summary>
        /// <param name="Order">要删除的订单实体</param>
        /// <returns></returns>
        public bool DeleteOrder(int OrderID)
        {
            Car_Order Ord = DB_Order.Select(P => P.Order_ID == OrderID).Single();

            return(DB_Order.Delete(Ord));
        }
Example #19
0
        /// <summary>
        /// 删除车名信息
        /// </summary>
        /// <param name="Version">要删除的车名实体</param>
        /// <returns></returns>
        public bool DeleteVersion(int VersionID)
        {
            Car_Version Ver = DB_Version.Select(P => P.Version_ID == VersionID).Single();

            return(DB_Version.Delete(Ver));
        }
Example #20
0
        /// <summary>
        /// 删除品牌信息
        /// </summary>
        /// <param name="Brand">要删除的品牌实体</param>
        /// <returns></returns>
        public bool DeleteBrand(int BrandID)
        {
            Car_Brand Bra = DB_Brand.Select(P => P.Brand_ID == BrandID).Single();

            return(DB_Brand.Delete(Bra));
        }