public bool RecheckLocked() { this.dp_list = DividendPaymentMaster.GetPayments_FX(this.FX_InputID); this.locked_flag = true; foreach (Dividend_Payment dp in this.dp_list) { if (!dp.Paid_And_Locked.Value) { this.locked_flag = false; break; } } return(this.locked_flag); }
public static Dictionary <int, FX_Input> Get_checkLocked_FI_dic() { FX_Input_master.Init_from_DB(); Dictionary <int, FX_Input> checked_dic = new Dictionary <int, FX_Input>(); foreach (KeyValuePair <int, FX_Input> pair in FX_Input_master.fi_dic) { checked_dic[pair.Key] = pair.Value; } //we have less unlocked dividend payment than locked ones List <Dividend_Payment> unlock_payment_list = DividendPaymentMaster.GetAll_payment_list(0); foreach (Dividend_Payment dp in unlock_payment_list) { int fxID = dp.FX_InputID.Value; if (checked_dic.ContainsKey(fxID)) { checked_dic[fxID].SetLockFlag(false); } } return(checked_dic); }