示例#1
0
        public void LoadLatelySell()
        {
            DataSet ds = Foundation.LatelyAllSell(m_SystemUser.SellDay);

            this.LatelySellTree.Nodes.Clear();
            TreeNode tnall = new TreeNode("最近销售")
            {
                Tag = "0"
            };

            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                tnall.Nodes.Add(new TreeNode(dr["outtime"].ToString())
                {
                    Tag = string.Empty
                });
            }
            this.LatelySellTree.Nodes.Add(tnall);

            //if (this.LatelySellTree.Nodes[0].Nodes.Count > 0)
            //{
            //    this.LatelySellTree.SelectedNode = this.LatelySellTree.Nodes[0].Nodes[0];
            //}
            //else
            //{
            //    this.LatelySellTree.SelectedNode = this.LatelySellTree.Nodes[0];
            //}
            //this.LatelySellTree.Nodes[0].Collapse(false);
        }
示例#2
0
 void LatelySellTree_AfterSelect(object sender, TreeViewEventArgs e)
 {
     if (m_LatelySell.LatelySellTree.SelectedNode == null)
     {
         return;
     }
     if (m_LatelySell.LatelySellTree.SelectedNode.Tag.ToString() == "0")
     {//所有最近销售
         LoadDataNew(Foundation.LatelyAllSell(m_SystemUser.SellDay));
     }
     else
     {//单笔销售
         LoadDataNew(Foundation.GetSellTimeData(m_LatelySell.LatelySellTree.SelectedNode.Text, m_SystemUser.SellDay));
     }
 }