本文整理汇总了C#中CustomList.FindAll方法的典型用法代码示例。如果您正苦于以下问题:C# CustomList.FindAll方法的具体用法?C# CustomList.FindAll怎么用?C# CustomList.FindAll使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CustomList
的用法示例。
在下文中一共展示了CustomList.FindAll方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetNewItemCode
private void GetNewItemCode(ref ConnectionManager conManager, ref CustomList<ItemMaster> lstItemMaster)
{
String newItemMasterID = String.Empty;
try
{
CustomList<ItemMaster> tempItemMasterList = lstItemMaster.FindAll(f => f.IsAdded);
if (tempItemMasterList.Count != 0)
{
newItemMasterID = StaticInfo.MakeUniqueCode("ItemCode", 20, DateTime.Today.ToString(), "yy", "I", "-", "");
lstItemMaster[0].ItemCode = newItemMasterID;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例2: GetNewSecurityRuleID
private void GetNewSecurityRuleID(ref ConnectionManager conManager, ref CustomList<SecurityRule> securityRuleList, ref CustomList<RuleDetails> securityRuleDetailList)
{
String newSecurityRuleID = String.Empty;
try
{
CustomList<SecurityRule> tempSecurityRuleList = securityRuleList.FindAll(f => f.IsAdded);
if (tempSecurityRuleList.Count != 0)
{
newSecurityRuleID = StaticInfo.MakeUniqueCode("SecurityRuleCode", 20, DateTime.Today.ToString(), "yy", "SR", "-", "");
securityRuleList[0].SecurityRuleCode = newSecurityRuleID;
securityRuleInfoID = newSecurityRuleID;
}
else
{
securityRuleInfoID = securityRuleList[0].SecurityRuleCode;
}
CustomList<RuleDetails> tempSecurityRuleDetailList = securityRuleDetailList.FindAll(f => f.IsAdded);
foreach (RuleDetails sRO in tempSecurityRuleDetailList)
{
sRO.SecurityRuleCode = securityRuleList[0].SecurityRuleCode;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例3: GetNewGroupID
private void GetNewGroupID(ref ConnectionManager conManager, ref CustomList<Group> groupList, ref CustomList<GroupRule> groupSecurityRuleList, ref CustomList<UserGroup> userGroupList)
{
String newGroupID = String.Empty;
try
{
CustomList<Group> tempGroupList = groupList.FindAll(f => f.IsAdded);
if (tempGroupList.Count != 0)
{
foreach (Group group in groupList)
{
newGroupID = StaticInfo.MakeUniqueCode("GroupCode", 20, DateTime.Today.ToString(), "yy", "G", "-", "");
group.GroupCode = newGroupID;
groupID = newGroupID;
}
}
else
{
groupID = groupList[0].GroupCode;
}
CustomList<GroupRule> tempGroupSecurityRuleList = groupSecurityRuleList.FindAll(f => f.IsAdded);
foreach (GroupRule gSR in tempGroupSecurityRuleList)
{
gSR.GroupCode = groupID;
}
CustomList<UserGroup> tempUserGroupList = userGroupList.FindAll(f => f.IsAdded);
foreach (UserGroup uG in tempUserGroupList)
{
uG.GroupCode = groupID;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例4: GetNewUserID
private void GetNewUserID(ref ConnectionManager conManager, ref CustomList<Users> userList)
{
String newUserCode = String.Empty;
try
{
CustomList<Users> addedUserList = userList.FindAll(f => f.IsAdded);
if (addedUserList.Count != 0)
{
newUserCode = StaticInfo.MakeUniqueCode(ref conManager, "Usercode", 20, DateTime.Today.ToString(), "yy", "UI", "-", "");
//user.UserCode = newUserCode;
userList[0].UserCode = newUserCode;
userCode = newUserCode;
}
else
{
userCode = userList[0].UserCode;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例5: ProManSys_Checked
private void ProManSys_Checked()
{
try
{
String refSourceString = String.Empty;
CustomList<RuleDetails> SecurityRuleDetailList = new CustomList<RuleDetails>();
CustomList<SECURITY.DAO.Menu> MenuList = (CustomList<SECURITY.DAO.Menu>)HttpContext.Current.Session["SecurityRule_MenuList"];
CustomList<TempRuleDetails> TempSecurityRuleDetailList = (CustomList<TempRuleDetails>)HttpContext.Current.Session["SecurityRule_TempSecurityRuleDetailList"];
string hfApplicationID = (string)HttpContext.Current.Session["ApplicationID"];
string PersonName = (string)HttpContext.Current.Session["PersonName"];
string CompanyID = (string)HttpContext.Current.Session["CompanyID"];
CustomList<SECURITY.DAO.Menu> SelectedMenuList = MenuList.FindAll(f => f.IsModified);
foreach (SECURITY.DAO.Menu M in SelectedMenuList)
{
if (M.CanInsert || M.CanSelect || M.CanUpdate || M.CanDelete)
{
RuleDetails objNewSRO = new RuleDetails();
objNewSRO.ApplicationID = M.ApplicationID;
objNewSRO.ObjectID = M.MenuID;
objNewSRO.ObjectType = "Menu";
objNewSRO.CanInsert = M.CanInsert;
objNewSRO.CanSelect = M.CanSelect;
objNewSRO.CanUpdate = M.CanUpdate;
objNewSRO.CanDelete = M.CanDelete;
SecurityRuleDetailList.Add(objNewSRO);
}
}
CustomList<Application> ApplicationList = (CustomList<Application>)HttpContext.Current.Session["SecurityRule_ApplicationList"];
foreach (Application a in ApplicationList)
{
CustomList<RuleDetails> upDate = SecurityRuleDetailList.FindAll(f => f.ApplicationID == a.ApplicationID);
CustomList<RuleDetails> newUpdate = new CustomList<RuleDetails>();
newUpdate = upDate.FindAll(f => f.CanInsert == true || f.CanSelect == true || f.CanUpdate == true || f.CanDelete == true);
if (newUpdate.Count != 0)
a.IsSaved = true;
else
a.IsSaved = false;
}
HttpContext.Current.Session["SecurityRule_MenuList"] = MenuList;
HttpContext.Current.Session["SecurityRule_SecurityRuleDetailList"] = SecurityRuleDetailList;
HttpContext.Current.Session["SecurityRule_TempSecurityRuleDetailList"] = TempSecurityRuleDetailList;
HttpContext.Current.Session["SecurityRule_ApplicationList"] = ApplicationList;
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ContentType = "text/plain";
HttpContext.Current.Response.Write(refSourceString);
HttpContext.Current.Response.Flush();
}
catch (Exception ex)
{
throw ex;
}
}
示例6: PopulateGroupInformation
private void PopulateGroupInformation(Group group)
{
try
{
SetDataInControls(group);
groupSecurityRuleList = new CustomList<GroupRule>();
SecurityRuleList = new CustomList<SECURITY.DAO.SecurityRule>();
SecurityRuleList = manager.GetAlltblSecurityRule();
groupSecurityRuleList = manager.GetAllGroupSecurityRule(group.GroupCode);
SearchGroupSecurityRuleList = groupSecurityRuleList;
foreach (SECURITY.DAO.SecurityRule sR in SecurityRuleList)
{
CustomList<GroupRule> gSRList = groupSecurityRuleList.FindAll(f => f.SecurityRuleCode == sR.SecurityRuleCode);
foreach (GroupRule gSR in gSRList)
{
sR.IsSaved = true;
}
}
//PopulateMenuItem();
UserGroupList = new CustomList<UserGroup>();
UserGroupList = manager.GetAllUser();
CustomList<UserGroup> SelectedUser = manager.GetAllUserGroup(group.GroupCode);
foreach (UserGroup uG in UserGroupList)
{
UserGroup user = SelectedUser.Find(f => f.UserCode == uG.UserCode);
if (user.IsNotNull())
{
uG.IsSaved = true;
}
}
}
catch (Exception ex)
{
throw (ex);
}
}
示例7: InitializeSession
private void InitializeSession()
{
HeadCategoryList = new CustomList<AccReportConfigurationHeadCategory>();
HeadCategoryList = manager.GetAllAccReportConfigurationHeadCategory();
ParentList = new CustomList<AccReportConfigurationHeadCategory>();
ParentList = HeadCategoryList.FindAll(f => f.ParentID == 0);
HeadCategoryByReportTypeList = new CustomList<AccReportConfigurationHeadCategory>();
}
示例8: GetNewVoucherID
private void GetNewVoucherID(ref ConnectionManager conManager, bool requiredTransaction, ref CustomList<Acc_Voucher> AccVoucherList, string prifix)
{
String newAccVoucherID = String.Empty;
try
{
CustomList<Acc_Voucher> tempAccVoucherList = AccVoucherList.FindAll(f => f.IsAdded);
if (tempAccVoucherList.Count != 0)
{
string prifix1 = prifix + "-";
newAccVoucherID = Convert.ToString(StaticInfo.GetUniqueCodeWithoutSignature(ref conManager, requiredTransaction, "Acc_Voucher", "VoucherNo", prifix1));
tempAccVoucherList[0].VoucherNo = prifix1 + newAccVoucherID;
voucherID = prifix1 + newAccVoucherID;
}
}
catch (Exception ex)
{
throw ex;
}
}
示例9: SavePFVoucher
//End
//Search Voucher
//public CustomList<Acc_Voucher> GetAllAcc_VoucherSearch(string searchStr, string blank)
//{
// return Acc_Voucher.GetAllAcc_VoucherSearch(searchStr, blank);
//}
//end
public void SavePFVoucher(ref CustomList<Acc_Voucher> AccVoucherList, ref CustomList<Acc_VoucherDet> AccVoucherDetList, string prifix)
{
ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
Boolean blnTranStarted = false;
try
{
blnTranStarted = true;
conManager.BeginTransaction();
ReSetSPName(ref AccVoucherList, ref AccVoucherDetList);
if (AccVoucherList[0].VoucherNo.IsNullOrEmpty())
{
GetNewVoucherID(ref conManager, blnTranStarted, ref AccVoucherList, prifix);
}
else
{
string[] items = AccVoucherList[0].VoucherNo.Split('-');
if (prifix != items[0])
{
string prifix1 = prifix + "-" + items[1];
voucherID = prifix1;
AccVoucherList[0].VoucherNo = prifix1;
}
else
voucherID = AccVoucherList[0].VoucherNo;
}
blnTranStarted = true;
if (AccVoucherList[0].IsAdded)
{
object scope_Identity = conManager.InsertData(blnTranStarted, AccVoucherList);
AccVoucherList[0].VoucherKey = Convert.ToInt64(scope_Identity);
}
else
{
conManager.SaveDataCollectionThroughCollection(blnTranStarted, AccVoucherList);
}
CustomList<Acc_VoucherDet> AddedVoucherDetList = AccVoucherDetList.FindAll(f => f.IsAdded);
foreach (Acc_VoucherDet aVD in AddedVoucherDetList)
{
aVD.VoucherKey = AccVoucherList[0].VoucherKey;
}
conManager.SaveDataCollectionThroughCollection(blnTranStarted, AccVoucherDetList);
conManager.CommitTransaction();
AccVoucherList.AcceptChanges();
AccVoucherDetList.AcceptChanges();
}
catch (Exception Ex)
{
conManager.RollBack();
throw Ex;
}
finally
{
if (conManager.IsNotNull())
{
blnTranStarted = false;
conManager.Dispose();
}
}
}
示例10: GetNewStockTransaction
private void GetNewStockTransaction(ref ConnectionManager conManager, ref CustomList<StockTransactionMaster> lstStockTransactionMaster)
{
String newCustomCode = String.Empty;
try
{
CustomList<StockTransactionMaster> tempStockTransactionMaster = lstStockTransactionMaster.FindAll(f => f.IsAdded);
if (tempStockTransactionMaster.Count != 0)
{
newCustomCode = StaticInfo.MakeUniqueCode("CustomCode", 20, DateTime.Today.ToString(), "yy", "ST", "-", "");
tempStockTransactionMaster[0].CustomCode = newCustomCode;
customCode = newCustomCode;
}
else
customCode = lstStockTransactionMaster[0].CustomCode;
}
catch (Exception ex)
{
throw ex;
}
}