コード例 #1
0
        public ActionResult DqdmCodeChange(string sChangeValue, string sNowID, string PanelID)
        {
            zylbdmTableManage         man     = new zylbdmTableManage();
            zylbdmTableDataTreeManage manTree = new zylbdmTableDataTreeManage();

            if (man.ExistDMValue(sChangeValue, sNowID))
            {
                X.Msg.Alert("注意", "输入的代码已经存在!").Show();
                SetHiddenValue(PanelID + "_ParentIndex", "-2");
                SetTextField(PanelID + "_ParentName", "");
            }
            else
            {
                Td_zylbdm model = man.GetParentObj(sChangeValue);
                if (model != null)
                {
                    SetHiddenValue(PanelID + "_ParentIndex", model.ID.ToString());
                    SetTextField(PanelID + "_ParentName", manTree.GetAllParentName(model.ID, true));
                }
                else
                {
                    SetHiddenValue(PanelID + "_ParentIndex", "-1");
                    SetTextField(PanelID + "_ParentName", "所有类别");
                }
            }
            return(this.Direct());
        }
コード例 #2
0
        public override ActionResult WindowCommonShow(string PanelID, string ParentVariable, string ParentKey)
        {
            GetParentVariable(ParentVariable);
            zylbdmTableDataListManage manList = new zylbdmTableDataListManage();
            zylbdmTableDataTreeManage manTree = new zylbdmTableDataTreeManage();
            zylbdmTableManage         man     = new zylbdmTableManage();
            Td_zylbdm model = new Td_zylbdm();

            if (ParentVar.transValue.Contains("Row")) //修改
            {
                manList.InitSelection(ParentVar.transValue);
                model = manTree.GetSpecialModelFromCurrentID(manList.sRowNowID);
            }
            else
            {
                Td_zylbdm parentModel = manTree.GetParentNode(Convert.ToInt64(ParentVar.transValue));
                model.ParentIndex = parentModel.ID;
                model.ParentName  = manTree.GetAllParentName(parentModel.ID, true);
                model.Code        = man.GetParentDM(parentModel.ID);
            }
            var form = this.GetCmp <FormPanel>(PanelID + "_Form");

            form.SetValues(model);
            return(this.Direct());
        }