示例#1
0
文件: Frm_Region.cs 项目: radtek/Lime
        private void Frm_Region_Load(object sender, EventArgs e)
        {
            rs         = this.swapdata["bobject"] as RegisterStru;
            parentNode = this.swapdata["parentNode"] as TreeListNode;
            unitOfWork = this.swapdata["session"] as UnitOfWork;

            combo_rg030.SelectedIndex = 0;
            combo_rg033.SelectedIndex = 0;
            txt_rg003.Text            = rs.GetSuggestName(parentNode, "3");

            if (!parentNode.HasChildren)
            {
                txt_rg010.Text = "1";
            }
            else
            {
                if (string.IsNullOrWhiteSpace(parentNode.LastNode.GetValue("RG011").ToString()))
                {
                    txt_rg010.Text = "1";
                }
                else
                {
                    txt_rg010.Text = (int.Parse(parentNode.LastNode.GetValue("RG011").ToString()) + 1).ToString();
                }
            }
        }
示例#2
0
        private void Frm_region_Load(object sender, EventArgs e)
        {
            rs = this.swapdata["bobject"] as RegisterStru;
            TreeListNode parentNode = this.swapdata["pnode"] as TreeListNode;

            if (this.swapdata["action"].ToString() == "add")              //新增
            {
                combo_rg030.SelectedIndex = 0;
                combo_rg033.SelectedIndex = 0;
                txt_rg003.Text            = rs.GetSuggestName(parentNode, "3");

                if (!parentNode.HasChildren)
                {
                    txt_rg010.Text = "1";
                }
                else
                {
                    if (string.IsNullOrWhiteSpace(parentNode.LastNode.GetValue("RG011").ToString()))
                    {
                        txt_rg010.Text = "1";
                    }
                    else
                    {
                        txt_rg010.Text = (int.Parse(parentNode.LastNode.GetValue("RG011").ToString()) + 1).ToString();
                    }
                }
            }
            else               //编辑区
            {
            }
        }