private static List <XH_MelonCutRegisterTableInfo> GetMeloncutRegisterList(string code, DateTime regDate, DateTime cutDate, Types.MeloncutType cutType) { if (String.IsNullOrEmpty(code)) { return(null); } XH_MelonCutRegisterTableDal dal = new XH_MelonCutRegisterTableDal(); string where = string.Format("Code = '{0}' AND RegisterDate = '{1}' AND CutDate ='{2}' AND CutType ='{3}'", code, regDate, cutDate, (int)cutType); return(dal.GetListArray(where)); // return DataRepository.XhMelonCutRegisterTableProvider.Find(where); }
/// <summary> /// 处理股票分红(分红过户) /// </summary> private static bool ProcessCStockMelonStock() { XH_MelonCutRegisterTableDal dal = new XH_MelonCutRegisterTableDal(); string where = string.Format(" CutType ='{0}'", (int)Types.MeloncutType.Stock); List <XH_MelonCutRegisterTableInfo> list = dal.GetListArray(where); //选出今日需要分红的股票分红信息 var q = from c in list where CheckDate(c.CutDate) && c.RegisterAmount > 0 && !string.IsNullOrEmpty(c.Code) select c; bool issum = true; if (q != null) { //2.如果今日有需要现金分红的就进行分红 issum = ProcessStockCut(q.ToList <XH_MelonCutRegisterTableInfo>()); } return(issum); }