Beispiel #1
0
        /// *******************************************************************************************
        /// <summary>
        /// 添加属性
        /// </summary>
        /// *******************************************************************************************
        private void SavePropertyData()
        {
            try
            {
                Procedure    procedure  = (Procedure)Session["Procedure"];
                UltraWebGrid UWGridCase = ((UltraWebGrid)this.UltraWebTab1.Tabs.GetTab(3).FindControl("UltraWebGrid4"));

                for (int i = 0; i < UWGridCase.Rows.Count; i++)
                {
                    bool     isNew        = (UWGridCase.Rows[i].Cells[0].Text == null);
                    Property PropertyCase = null;
                    if (isNew)
                    {
                        PropertyCase = Rms.WorkFlow.DefinitionManager.NewProperty();
                        PropertyCase.ProcedureCode = procedure.ProcedureCode;
                        procedure.AddNewProperty(PropertyCase);
                    }
                    else
                    {
                        PropertyCase = procedure.GetProperty(UWGridCase.Rows[i].Cells[0].Text);
                    }

                    PropertyCase.ProcedurePropertyName = (string)UWGridCase.Rows[i].Cells[1].Value;
                    if ((string)UWGridCase.Rows[i].Cells[2].Value == null || (string)UWGridCase.Rows[i].Cells[2].Value == "--选择--")
                    {
                        PropertyCase.ProcedurePropertyType = "";
                    }
                    else
                    {
                        PropertyCase.ProcedurePropertyType = (string)UWGridCase.Rows[i].Cells[2].Value;
                    }
                    PropertyCase.Remak = (string)UWGridCase.Rows[i].Cells[3].Value;
                }
                Session["Procedure"] = procedure;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }