예제 #1
0
        /// <summary>
        /// 设置特殊属性的值,从模型到属性列表
        /// 有些属性的值是通过计算得来的,保存参数之前需要先调用一下此方法
        /// </summary>
        public virtual void SetBasicPropertyValues()
        {
            //默认XmlKey的值有ID决定
            int              xmlKey   = ID;
            long             xmlObjID = ObjectID;
            ResourceProperty propertyValue;

            for (int i = 0; i < mListProperties.Count; i++)
            {
                propertyValue = mListProperties[i];
                switch (propertyValue.PropertyID)
                {
                case S1110Consts.PROPERTYID_KEY:
                    propertyValue.Value = Key.ToString();
                    break;

                case S1110Consts.PROPERTYID_ID:
                    propertyValue.Value = ID.ToString();
                    break;

                case S1110Consts.PROPERTYID_PARENTOBJID:
                    propertyValue.Value = ParentID.ToString();
                    break;

                case S1110Consts.PROPERTYID_XMLKEY:
                    propertyValue.Value = xmlKey.ToString();
                    break;

                case S1110Consts.PROPERTYID_XMLOBJID:
                    propertyValue.Value = xmlObjID.ToString();
                    break;
                }
            }
        }
예제 #2
0
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.parentID)
                {
                    hashcode = (hashcode * 397) + ParentID.GetHashCode();
                }
                if (__isset.level)
                {
                    hashcode = (hashcode * 397) + Level.GetHashCode();
                }
                if (__isset.children)
                {
                    hashcode = (hashcode * 397) + TCollections.GetHashCode(Children);
                }
                if (__isset.smallset)
                {
                    hashcode = (hashcode * 397) + Smallset.GetHashCode();
                }
                if (__isset.splitinfo)
                {
                    hashcode = (hashcode * 397) + Splitinfo.GetHashCode();
                }
            }
            return(hashcode);
        }
예제 #3
0
        public void Write(IByteWriterBase writer)
        {
            writer.Write(WorkspaceID);
            writer.Write(ID);
            writer.Write(ParentID.GetValueOrDefault());
            writer.Write((int)StateType);
            writer.Write(DisplayName);
            writer.Write(Name);
            writer.Write((int)ActivityType);
            writer.Write(Version);
            writer.Write(IsSimulation);
            writer.Write(HasError);
            writer.Write(ErrorMessage);
            writer.Write(Server);
            writer.Write(ServerID);
            writer.Write(OriginatingResourceID);
            writer.Write(OriginalInstanceID);
            writer.Write(StartTime);
            writer.Write(EndTime);
            writer.Write(NumberOfSteps);
            writer.Write((int)ExecutionOrigin);
            writer.Write(ExecutionOriginDescription);
            writer.Write(ExecutingUser);
            writer.Write(EnvironmentID);
            writer.Write(SessionID);

            Serialize(writer, Inputs);
            Serialize(writer, Outputs);
            Serialize(writer, AssertResultList);
        }
예제 #4
0
        public int CompareTo(ParentChildEntity other)
        {
            if (other == null)
            {
                return(1);
            }

            var order = ID.GetValueOrDefault().CompareTo(other.ID.GetValueOrDefault());

            if (order != 0)
            {
                return(order);
            }

            order = StringComparer.Ordinal.Compare(Name, other.Name);
            if (order != 0)
            {
                return(order);
            }

            order = ParentID.GetValueOrDefault().CompareTo(other.ParentID.GetValueOrDefault());
            if (order != 0)
            {
                return(order);
            }

            order = StringComparer.Ordinal.Compare(Type, other.Type);
            if (order != 0)
            {
                return(order);
            }

            return(0);
        }
예제 #5
0
        /// <summary>
        /// Get XmlNode containing the node.
        /// </summary>
        /// <param name="xDoc">XmlDocument object used to spawn node</param>
        /// <param name="full">If true, all possible attributes will be output.
        /// If false, only filled and appropriate attributes will be output.</param>
        public override XmlNode ToXml(XmlDocument xDoc, bool full = false)
        {
            XmlElement   xElem;
            XmlAttribute xAttr;

            xElem = xDoc.CreateElement("folder_arme");
            if (!HasDefaultName)
            {
                xAttr       = xDoc.CreateAttribute("name");
                xAttr.Value = Name;
                xElem.Attributes.Append(xAttr);
            }
            if (ID != null)
            {
                xAttr       = xDoc.CreateAttribute("id_arme");
                xAttr.Value = ID.ToString();
                xElem.Attributes.Append(xAttr);
            }
            if (ParentID != null)
            {
                xAttr       = xDoc.CreateAttribute("parent_id_arme");
                xAttr.Value = ParentID.ToString();
                xElem.Attributes.Append(xAttr);
            }
            foreach (string item in ExtraAttributes)
            {
                xAttr       = xDoc.CreateAttribute(item);
                xAttr.Value = "";
                xElem.Attributes.Append(xAttr);
            }

            return(xElem);
        }
예제 #6
0
파일: AuditLog.cs 프로젝트: kapiya/Warewolf
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = 1561563491;

                hashCode = (hashCode * 157) + Id.GetHashCode();
                hashCode = (hashCode * 157) + WorkflowID.GetHashCode();
                hashCode = (hashCode * 157) + ExecutionID.GetHashCode();
                hashCode = (hashCode * 157) + ExecutionOrigin.GetHashCode();
                hashCode = (hashCode * 157) + IsSubExecution.GetHashCode();
                hashCode = (hashCode * 157) + IsRemoteWorkflow.GetHashCode();
                hashCode = (hashCode * 157) + WorkflowName.GetHashCode();
                hashCode = (hashCode * 157) + AuditType.GetHashCode();
                hashCode = (hashCode * 157) + PreviousActivity.GetHashCode();
                hashCode = (hashCode * 157) + PreviousActivityType.GetHashCode();
                hashCode = (hashCode * 157) + PreviousActivityId.GetHashCode();
                hashCode = (hashCode * 157) + NextActivity.GetHashCode();
                hashCode = (hashCode * 157) + NextActivityType.GetHashCode();
                hashCode = (hashCode * 157) + NextActivityId.GetHashCode();
                hashCode = (hashCode * 157) + ServerID.GetHashCode();
                hashCode = (hashCode * 157) + ParentID.GetHashCode();
                hashCode = (hashCode * 157) + ExecutingUser.GetHashCode();
                hashCode = (hashCode * 157) + ExecutionOriginDescription.GetHashCode();
                hashCode = (hashCode * 157) + ExecutionToken.GetHashCode();
                hashCode = (hashCode * 157) + AdditionalDetail.GetHashCode();
                hashCode = (hashCode * 157) + Environment.GetHashCode();
                hashCode = (hashCode * 157) + AuditDate.GetHashCode();

                return(hashCode);
            }
        }
예제 #7
0
 protected void 工作计划(object sender, EventArgs e)
 {
     ParentID.DataSource     = WebBLL.Tbl_ProjectArchiveManager.GetTbl_ProjectArchiveParentName(" ClassName1='" + this.ClassName1.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue) + "and ClassName2='" + this.ClassName2.SelectedValue + "'");
     ParentID.DataTextField  = "PA_Name";
     ParentID.DataValueField = "ID";
     ParentID.DataBind();
     ParentID.Items.Insert(0, new ListItem("选择卷册", ""));
 }
        public override string ToString()
        {
            string ret = "\n\tParents: ";

            ParentID.ForEach(l => ret = ret + "\n\t\t" + l);
            ret = ret + "\n\tDescription: ";
            Product.Features.ForEach(f => ret = ret + "\n\t\t" + f.Description + " - " + f.Date);
            ret = ret + "\n\tAuthor: " + Author;
            return(ret);
        }
예제 #9
0
        /// <summary>
        /// The thread of messages
        /// </summary>
        public Listing <PrivateMessage> GetThread()
        {
            if (string.IsNullOrEmpty(ParentID))
            {
                return(null);
            }
            var id = ParentID.Remove(0, 3);

            thread = new Listing <PrivateMessage>(WebAgent, $"/message/messages/{id}.json");
            return(thread);
        }
예제 #10
0
        private void BindDropDownList()
        {
            ArrayList modelList = new ArrayList();

            modelList.Add(new Model(Constants.BLANK_LONG_VALUE, SimpleResourceHelper.GetString("SELECT.EMPTY.LABEL")));
            modelList.AddRange(this.modelService.FindAllWithExclude(this.Domain.ID));

            ParentID.DataSource     = modelList;
            ParentID.DataTextField  = "Name";
            ParentID.DataValueField = "ID";
            ParentID.DataBind();
        }
예제 #11
0
        public override int CompareTo(object dictionary)
        {
            if (dictionary == null)
            {
                return(1);
            }

            if ((dictionary as Dictionary).ParentID == ParentID)
            {
                return(DisplayOrder.CompareTo((dictionary as Dictionary).DisplayOrder));
            }

            return(ParentID.CompareTo((dictionary as Dictionary).ParentID));
        }
예제 #12
0
 protected void Page_Load(object sender, EventArgs e)
 {
     MyAddInit();
     if (!this.IsPostBack)
     {
         chkMenuRight.DataBindEx(SystemSet._MENURIGHTCHAR);
         ParentID.DataBindEx();
         if ((CommonEnum.PageState)ViewState["ps"] == CommonEnum.PageState.VIEW)
         {
             btnSave.Visible = false;
         }
         BindPage(ID);
     }
 }
        public void UnbindFromParent()
        {
            if (ParentID.IsEmptyOrNull())
            {
                return;
            }

            var parent = Q.FindElementWithRelativeId(widget.Element, ParentID).TryGetWidget <TParentWidget>();

            if (parent != null)
            {
                parent.Element.Unbind("." + widget.UniqueName);
            }
        }
        public void BindToParent()
        {
            if (ParentID.IsEmptyOrNull())
            {
                return;
            }

            var parent = Q.FindElementWithRelativeId(widget.Element, ParentID).TryGetWidget <TParentWidget>();

            if (parent != null)
            {
                parent.Element.Bind("change." + widget.UniqueName, delegate
                {
                    ParentValue = getParentValue(parent);
                });
            }
        }
예제 #15
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ParentID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByAllParentID(0);
                ParentID.DataTextField  = "ClassName";
                ParentID.DataValueField = "ID";
                ParentID.DataBind();
                ParentID.Items.Insert(0, new ListItem("作为一级分类", "0"));

                if (Request.QueryString["pid"] != "")
                {
                    ParentID.SelectedValue = Request.QueryString["pid"];
                    ParentID.Enabled       = false;
                }
            }
        }
예제 #16
0
        protected void PD_Type_SelectedIndexChanged(object sender, EventArgs e)
        {
            string type = this.PD_Type.SelectedValue;

            if (type == "问题修改" || type == "问题重提")
            {
                lishitizi.Visible       = true;
                ParentID.DataSource     = WebBLL.Tbl_ProjectDocumentManager.GetTbl_ProjectDocumentParent(" ClassName='" + this.ClassName.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue));
                ParentID.DataTextField  = "PD_Name";
                ParentID.DataValueField = "ID";
                ParentID.DataBind();
                ParentID.Items.Insert(0, "选择提资");
            }
            else
            {
                lishitizi.Visible = false;
            }
        }
예제 #17
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         B_Admin badmin = new B_Admin();
         badmin.CheckMulitLogin();
         if (!badmin.ChkPermissions("NodeEdit"))
         {
             function.WriteErrMsg("没有权限进行此项操作");
         }
         string mParentID = base.Request.QueryString["ParentID"];
         int    ParentID;
         if (string.IsNullOrEmpty(mParentID))
         {
             ParentID = 0;
         }
         else
         {
             ParentID = DataConverter.CLng(mParentID);
         }
         if (ParentID == 0)
         {
             this.LblNodeName.Text = "根节点";
         }
         else
         {
             M_Node node = this.bll.GetNode(ParentID);
             if (node.IsNull)
             {
                 this.LblNodeName.Text = "根节点";
             }
             else
             {
                 this.LblNodeName.Text = node.NodeName;
             }
         }
         this.HdnParentId.Value = ParentID.ToString();
         this.HdnDepth.Value    = this.bll.GetDepth(ParentID).ToString();
         this.HdnOrderID.Value  = this.bll.GetOrder(ParentID).ToString();
     }
 }
예제 #18
0
            private ParentID GetParentID()
            {
                if (_myParent == null)
                {
                    return(new ParentID(null, null));
                }

                PropertyInfo[] objProps    = _myParent.Obj.GetType().GetProperties();
                ParentID       theParentID = new ParentID(null, null);

                foreach (PropertyInfo eachPropInfo in objProps)
                {
                    object[] theAttrs = eachPropInfo.GetCustomAttributes(typeof(ExpergentParentIDAttribute), true);
                    if (theAttrs.Length > 0)
                    {
                        theParentID.theInfo  = eachPropInfo;
                        theParentID.theValue = eachPropInfo.GetValue(_myParent.Obj, BindingFlags.GetProperty, null, null, null);
                        break;
                    }
                }

                return(theParentID);
            }
예제 #19
0
 protected void ClassName_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         //判断该专业是否存在于这个项目
         int rows = WebBLL.Tbl_ProjectDesignerManager.GetDataTableByPage(1, 1, "ClassName='" + this.ClassName.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue), "").Rows.Count;
         if (rows < 1)
         {
             ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('该项目不存在这个专业!');", true);
             ClassName.SelectedIndex = 0;
             return;
         }
         //获取这个项目这个专业的提资
         ParentID.DataSource     = WebBLL.Tbl_ProjectDocumentManager.GetTbl_ProjectDocumentParent(" ClassName='" + this.ClassName.SelectedValue + "' and ProjectID=" + Convert.ToInt32(this.ProjectID.SelectedValue));
         ParentID.DataTextField  = "PD_Name";
         ParentID.DataValueField = "ID";
         ParentID.DataBind();
         ParentID.Items.Insert(0, new ListItem("选择提资", ""));
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, this.GetType(), "message", "alert('请先选择对应项目!');", true);
     }
 }
        public override int GetHashCode()
        {
            int hashcode = 157;

            unchecked {
                if (__isset.metaID)
                {
                    hashcode = (hashcode * 397) + MetaID.GetHashCode();
                }
                if (__isset.parentID)
                {
                    hashcode = (hashcode * 397) + ParentID.GetHashCode();
                }
                if (__isset.childCount)
                {
                    hashcode = (hashcode * 397) + ChildCount.GetHashCode();
                }
                if (__isset.isSmallSet)
                {
                    hashcode = (hashcode * 397) + IsSmallSet.GetHashCode();
                }
            }
            return(hashcode);
        }
예제 #21
0
        /// <summary>
        /// Get XmlNode containing the node.
        /// </summary>
        /// <param name="xDoc">XmlDocument object used to spawn node</param>
        /// <param name="full">If true, all possible attributes will be output.
        /// If false, only filled and appropriate attributes will be output.</param>
        public override XmlNode ToXml(XmlDocument xDoc, bool full = false)
        {
            XmlElement   xElem;
            XmlAttribute xAttr;

            xElem = xDoc.CreateElement(Enabled ? "event" : "disabled_event");
            if (!HasDefaultName || full)
            {
                xAttr       = xDoc.CreateAttribute("name");
                xAttr.Value = Name;
                xElem.Attributes.Append(xAttr);
            }
            if (ID != null)
            {
                xAttr       = xDoc.CreateAttribute("id_arme");
                xAttr.Value = ID.ToString();
                xElem.Attributes.Append(xAttr);
            }
            if (ParentID != null)
            {
                xAttr       = xDoc.CreateAttribute("parent_id_arme");
                xAttr.Value = ParentID.ToString();
                xElem.Attributes.Append(xAttr);
            }

            foreach (MissionStatement item in Conditions)
            {
                xElem.AppendChild(item.ToXml(xDoc, full));
            }
            foreach (MissionStatement item in Actions)
            {
                xElem.AppendChild(item.ToXml(xDoc, full));
            }

            return(xElem);
        }
예제 #22
0
        public void ReadValue()
        {
            ParentID.DataSource     = WebBLL.Tbl_ClassManager.GetTbl_ClassByAllParentID(0);
            ParentID.DataTextField  = "ClassName";
            ParentID.DataValueField = "ID";
            ParentID.DataBind();
            ParentID.Items.Insert(0, new ListItem("作为一级分类", "0"));

            int pid = WebCommon.Public.ToInt(Request.QueryString["pid"]);

            if (pid > 0)
            {
                ParentID.Enabled = false;
            }

            int ID = int.Parse(Request.QueryString["id"].ToString());

            WebModels.Tbl_Class tblClass = WebBLL.Tbl_ClassManager.GetTbl_ClassById(ID);
            this.ClassName.Text = tblClass.ClassName;
            this.ParentID.Text  = tblClass.ParentID.ToString();
            this.Remark.Text    = tblClass.Remark;
            this.Status.Text    = tblClass.Status;
            this.OrderNum.Text  = tblClass.OrderNum.ToString();
        }
예제 #23
0
        public ActionResult Addpost(hx_td_web_type p)
        {
            ChuanglitouP2P.BLL.B_td_web_type   b1  = new BLL.B_td_web_type();
            ChuanglitouP2P.Model.M_td_web_type obj = new Model.M_td_web_type();

            int rootid   = DNTRequest.GetInt("rootid", 0);
            int isresult = 0;


            int    ClassID = 0;
            string ClassName;
            int    PrevOrderID;
            int    RootID = 0;
            int    ParentDepth;
            string ParentPath;
            string ParentName;

            int depath;

            int PrevID;

            int Child;
            int ParentID;


            PrevOrderID = 0;
            ParentPath  = "0";
            ParentName  = "";
            ParentDepth = 0;
            PrevID      = 0;

            Child      = 0;
            ParentPath = "";

            ParentID  = Convert.ToInt16(Request.Form["parentid"]);
            ClassName = DNTRequest.GetString("menu_name");

            ClassID = b1.GetMaxId();

            if (ParentID > 0)
            {
                SqlDataReader sdr = DbHelperSQL.Re_dr("select * From hx_td_web_type where menu_id=" + ParentID.ToString() + "");

                if (sdr.Read() == false)
                {
                    Response.Write("<script>alert(\"所属栏目已经被删除!\");history.back();</script>");
                }
                else
                {
                    RootID      = Convert.ToInt32(sdr["RootID"]);
                    ParentName  = sdr["menu_name"].ToString();
                    ParentDepth = Convert.ToInt32(sdr["Depath"]);
                    ParentPath  = sdr["ParentPath"].ToString();
                    Child       = Convert.ToInt32(sdr["Child"]);
                    // ParentPath = ParentPath + "," + ParentID;    //得到此栏目的父级栏目路径
                    PrevOrderID = Convert.ToInt32(sdr["OrderID"]);
                    sdr.Close();
                    sdr.Dispose();
                }
                sdr.Close();
                sdr.Dispose();
            }
            else
            {
                RootID = ClassID;
            }

            // p = (hx_td_web_type)Utils.ValidateModelClass(p);
            if (ParentID > 0)
            {
                depath = ParentDepth + 1;
            }
            else
            {
                depath = 0;
            }
            if (ParentPath == "")
            {
                ParentPath = "," + ClassID.ToString() + ",";
            }
            else
            {
                ParentPath += "," + ClassID.ToString() + ",";
            }

            try
            {
                obj.menu_id    = ClassID;   // +i;
                obj.menu_name  = ClassName; // +i.ToString();
                obj.parentid   = ParentID;
                obj.parentpath = ParentPath;
                obj.depath     = depath;
                obj.rootid     = rootid;
                obj.child      = 0;
                obj.previd     = PrevID;
                obj.nextid     = 0;

                obj.createtime = DateTime.Now;
                obj.orderid    = DNTRequest.GetInt("orderid", 1);
                obj.path1      = DNTRequest.GetString("path1");



                isresult = b1.Add(obj);
            }
            catch (Exception ee)
            {
                Response.Write(ee.Message.ToString());
            }

            if (ParentID > 0)
            {
                //更新其父类的子栏目数
                DbHelperSQL.RunSql("update hx_td_web_type set child=child+1 where menu_id=" + ParentID.ToString());
            }
            else if (ParentID == 0)
            {
                //DbHelperSQL.RunSql("update hx_td_web_type set rootid=" + isresult + ",parentpath='," + isresult + ",' where menu_id=" + isresult.ToString());
                DbHelperSQL.RunSql("update hx_td_web_type set parentpath='," + isresult + ",' where menu_id=" + isresult.ToString());
            }
            //Response.Write("<script>alert(\"添加成功\");location.href='Add_Edit_web_type.aspx?ParentID=" + ParentID.ToString() + "'</script>");

            //p.createtime = DateTime.Now;
            //p.menu_name = DNTRequest.GetString("menu_name");
            //p.path1 = DNTRequest.GetString("path1");
            //p.orderid = DNTRequest.GetInt("orderid", 0);


            //ef.hx_td_web_type.Add(p);
            //ef.SaveChanges();


            string str = "";

            if (rootid > 0)
            {
                str = StringAlert.Alert("网站分类添加成功!", "/Admin/WebType/index?rootid=" + rootid);
            }
            else
            {
                str = StringAlert.Alert("网站分类添加成功!", "/Admin/WebType/index?rootid=" + isresult);
            }


            return(Content(str, "text/html"));
        }
 public override int GetHashCode()
 {
     return(Name.GetHashCode() + ParentID.GetHashCode());
 }
 public override bool PerformDelete()
 {
     LogHelper.Debug <dictionaryTasks>(TypeID.ToString() + " " + ParentID.ToString() + " deleting " + Alias);
     new cms.businesslogic.Dictionary.DictionaryItem(ParentID).delete();
     return(true);
 }
예제 #26
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            ConfigurarControles();

            if (this.Parent.ID.Contains("frmDatos"))
            {
                ParentID = this.ID;
            }
            else
            {
                ParentID = this.Parent.ID;
            }

            if (!Page.IsPostBack)
            {
                this.TraducirControles(null);
                this.LlenarCombos();
                this.txtLocalidadCapitalFederal.Value = ((int)NegociosSisPackInterface.SisPack.LocalidadCodigoPostal.CapitalFederal).ToString();
                this.txtLocalidadRetiro.Value         = ((int)NegociosSisPackInterface.SisPack.LocalidadCodigoPostal.Retiro).ToString();
                this.txtCodigoPostalRetiro.Value      = ((int)NegociosSisPackInterface.SisPack.CodigoPostal.Retiro).ToString();
                this.txtPciaBsAs.Value = ((int)NegociosSisPackInterface.SisPack.Provincia.BsAs).ToString();
                this.txtLocalidadCapitalFederalDescripcion.Value = "CAPITAL FEDERAL";
                this.txtProvinciaBsAsDescripcion.Value           = "BUENOS AIRES";

                //if (this.Parent.ID.Equals("Cliente"))
                if (ParentID.Equals("Cliente"))
                {
                    /*VSA: Modificación desarrollo Códigos postales.*/
                    IAgencia oAgencia = AgenciaFactory.GetAgencia();
                    oAgencia.AgenciaID = Convert.ToInt32(this.AgenciaConectadaID);
                    oAgencia.ConsultarBasico();
                    try
                    {
                        //this.ddlProvincia.SelectedValue = oAgencia.Domicilio.Localidad.Provincia.ProvinciaID.ToString();
                        this.txtProvincia.Value     = oAgencia.Domicilio.Localidad.Provincia.ProvinciaDescrip;
                        this.txtProvinciaSelec.Text = oAgencia.Domicilio.Localidad.Provincia.ProvinciaID.ToString();
                        this.txtLocalidad.Value     = oAgencia.Domicilio.Localidad.LocalidadDescrip;
                        this.txtLocalidadSelec.Text = oAgencia.Domicilio.Localidad.LocalidadID.ToString();
                        //this.txtCalle.Value = oAgencia.Domicilio.Calle;
                        //this.txtCalleNro.Text = oAgencia.Domicilio.CalleNro;
                        if (oAgencia.Domicilio.OCodigoPostal.CodigoPostalID > 0)
                        {
                            this.txtCodPostal.Text    = oAgencia.Domicilio.OCodigoPostal.CodigoPostalNro;
                            this.txtCodPostalID.Value = oAgencia.Domicilio.OCodigoPostal.CodigoPostalID.ToString();
                        }
                        else
                        {
                            this.txtCodPostal.Text = oAgencia.Domicilio.Localidad.CodigoPostal;
                        }
                    }
                    catch (Exception)
                    { }
                    /*VSA: Fin modificación desarrollo Códigos postales.*/
                }

                //if (this.Parent.ID.Equals("Destinatario"))
                //{
                this.btnDomicilios.Visible = true;
                //}
            }
            //llama a la creación de la función de javascript para el evento onblur
            //this.ControlNroCalle();
            //this.txtCalleNro.Attributes.Add("onblur", "validateCalleNro" + this.Parent.ID + "();");
            this.SetearValidadores();
            this.OcultarControles();


            this.rbtTerminal.Attributes.Add("onclick", "setearRetiro" + ParentID + "();");
            this.rbtPuerta.Attributes.Add("onclick", "setearCapitalFederal" + ParentID + "();");
            //this.rbtTerminal.Attributes.Add("onclick", "setearRetiro" + this.Parent.ID + "();");
            //this.rbtPuerta.Attributes.Add("onclick", "setearCapitalFederal" + this.Parent.ID + "();");
        }
예제 #27
0
        public void WriteXml(XmlWriter writer)
        {
            //------Always log these for reconstruction------------
            writer.WriteAttributeString("DisplayName", DisplayName);

            writer.WriteAttributeString("ID", ID.ToString());

            writer.WriteAttributeString("OriginalInstanceID", OriginalInstanceID.ToString());

            writer.WriteAttributeString("ParentID", ParentID.ToString());

            writer.WriteAttributeString("ServerID", ServerID.ToString());

            writer.WriteAttributeString("StateType", StateType.ToString());

            writer.WriteElementString("HasError", HasError.ToString());

            writer.WriteAttributeString("SessionID", SessionID.ToString());

            if (HasError)
            {
                writer.WriteElementString("ErrorMessage", ErrorMessage);
            }
            //-----------------------------

            var settings = WorkflowLoggger.LoggingSettings;

            //Version
            if (settings.IsVersionLogged && !string.IsNullOrWhiteSpace(Version))
            {
                writer.WriteElementString("Version", Version);
            }

            //Type
            if (settings.IsTypeLogged)
            {
                writer.WriteElementString("Name", Name);
                writer.WriteElementString("ActivityType", ActivityType.ToString());
            }

            //Duration
            if (settings.IsDurationLogged)
            {
                if (Duration != default(TimeSpan))
                {
                    writer.WriteElementString("Duration", DurationString);
                }
            }

            //DateTime
            if (settings.IsDataAndTimeLogged)
            {
                if (StartTime != DateTime.MinValue)
                {
                    writer.WriteElementString("StartTime", StartTime.ToString("G"));
                }
                if (EndTime != DateTime.MinValue)
                {
                    writer.WriteElementString("EndTime", EndTime.ToString("G"));
                }
            }


            //Input
            if (settings.IsInputLogged && Inputs.Count > 0)
            {
                writer.WriteStartElement("Inputs");
                writer.WriteAttributeString("Count", Inputs.Count.ToString(CultureInfo.InvariantCulture));

                var inputSer = new XmlSerializer(typeof(DebugItem));
                foreach (var other in Inputs)
                {
                    inputSer.Serialize(writer, other);
                }
                writer.WriteEndElement();
            }

            //Output
            if (settings.IsOutputLogged && Outputs.Count > 0)
            {
                writer.WriteStartElement("Outputs");
                writer.WriteAttributeString("Count", Outputs.Count.ToString(CultureInfo.InvariantCulture));

                var outputSer = new XmlSerializer(typeof(DebugItem));
                foreach (var other in Outputs)
                {
                    outputSer.Serialize(writer, other);
                }
                writer.WriteEndElement();
            }

            //StartBlock
            if (IsFirstStep())
            {
                if (ExecutionOrigin != ExecutionOrigin.Unknown)
                {
                    writer.WriteElementString("ExecutionOrigin", ExecutionOrigin.ToString());
                }
                if (!string.IsNullOrWhiteSpace(ExecutingUser))
                {
                    writer.WriteElementString("ExecutingUser", ExecutingUser);
                }
            }

            //EndBlock

            if (IsFinalStep())
            {
                writer.WriteElementString("NumberOfSteps", NumberOfSteps.ToString(CultureInfo.InvariantCulture));
            }
        }
예제 #28
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.Page.IsPostBack)
            {
                B_Admin badmin = new B_Admin();
                badmin.CheckMulitLogin();
                if (!badmin.ChkPermissions("NodeEdit"))
                {
                    function.WriteErrMsg("没有权限进行此项操作");
                }
                string mParentID = base.Request.QueryString["ParentID"];
                int    ParentID;
                if (string.IsNullOrEmpty(mParentID))
                {
                    ParentID = 0;
                }
                else
                {
                    ParentID = DataConverter.CLng(mParentID);
                }
                if (ParentID == 0)
                {
                    this.LblNodeName.Text = "根节点";
                }
                else
                {
                    M_Node node = this.bll.GetNode(ParentID);
                    if (node.IsNull)
                    {
                        this.LblNodeName.Text = "根节点";
                    }
                    else
                    {
                        this.LblNodeName.Text = node.NodeName;
                    }
                }
                this.HdnParentId.Value = ParentID.ToString();

                DataTable dt = this.bllmodel.GetList();
                this.Repeater1.DataSource = dt;
                this.Repeater1.DataBind();

                string ModelIDArr = "";
                foreach (DataRow dr in dt.Rows)
                {
                    if (string.IsNullOrEmpty(ModelIDArr))
                    {
                        ModelIDArr = dr["ModelID"].ToString();
                    }
                    else
                    {
                        ModelIDArr += "," + dr["ModelID"].ToString();
                    }
                }
                this.HdnModeID.Value = ModelIDArr;
                //this.ChkModelList.DataSource = dt;
                //this.ChkModelList.DataTextField = "ModelName";
                //this.ChkModelList.DataValueField = "ModelID";
                //this.ChkModelList.DataBind();
                this.HdnDepth.Value    = this.bll.GetDepth(ParentID).ToString();
                this.HdnOrderID.Value  = this.bll.GetOrder(ParentID).ToString();
                this.callBackReference = this.Page.ClientScript.GetCallbackEventReference(this, "arg", "ReceiveServerData", "context");
            }
        }