Example #1
0
        private BrankBank getBranchBankRecord(TreeListNode node)
        {
            if (node == null)
            {
                return(null);
            }
            BrankBank branch = new BrankBank();

            UtilityFunction.ConvertTreeListNodeToObj <Model.BrankBank>(treeList1, node, branch);
            branch.BrankBankID  = Convert.ToInt32(node.GetDisplayText("BankId"));
            branch.BrankName    = node.GetDisplayText("BankName");
            branch.BrankAddress = node.GetDisplayText("Address");
            //branch.Phone = node.GetDisplayText("Phone");
            //branch.Note = node.GetDisplayText("Note");
            //if (!string.IsNullOrEmpty(node.GetDisplayText("CreateDate")))
            //    branch.CreateDate = Convert.ToDateTime(node.GetDisplayText("CreateDate"));
            //branch.CreateBy = node.GetDisplayText("CreateBy");
            //if (!string.IsNullOrEmpty(node.GetDisplayText("ModifyDate")))
            //    branch.ModifyDate = Convert.ToDateTime(node.GetDisplayText("ModifyDate"));
            //branch.ModifyBy = node.GetDisplayText("ModifyBy");
            branch.Bank = getBankRecord(node.ParentNode);
            return(branch);
        }
Example #2
0
        private Model.Bank getBankRecord(TreeListNode node)
        {
            if (node == null)
            {
                return(null);
            }

            Model.Bank bank = new Model.Bank();
            UtilityFunction.ConvertTreeListNodeToObj <Model.Bank>(treeList1, node, bank);
            //bank.BankId = Convert.ToInt32(node.GetDisplayText("BankId"));
            //bank.BankCode = node.GetDisplayText("BankCode");
            //bank.BankName = node.GetDisplayText("BankName");
            //bank.Address = node.GetDisplayText("Address");
            //bank.Phone = node.GetDisplayText("Phone");
            //bank.Fax = node.GetDisplayText("Fax");
            //bank.Email = node.GetDisplayText("Email");
            //bank.Note = node.GetDisplayText("Note");
            //bank.CreateDate = string.IsNullOrWhiteSpace(node.GetDisplayText("CreateDate"))==false? Convert.ToDateTime(node.GetDisplayText("CreateDate")):DateTime.Now;
            //bank.CreateBy = node.GetDisplayText("CreateBy");
            //if (!string.IsNullOrEmpty(node.GetDisplayText("ModifyDate")))
            //    bank.ModifyDate = Convert.ToDateTime(node.GetDisplayText("ModifyDate"));
            //bank.ModifyBy = node.GetDisplayText("ModifyBy");
            return(bank);
        }