예제 #1
0
        /// <summary>
        /// Update the cell in document for version build
        /// </summary>
        /// <param name="sDocPath"></param>
        /// <param name="aVer"></param>
        public void SetCellBuildVersion(string sDocPath, string [] aVer)
        {
            /*Open the document */
            CvGtwyDocument oCurDoc = gtApp.Documents.Open(sDocPath, 0);
            CvGtwyCell     oCell   = oCurDoc.Cells.get_ItemByName("VERMAJ");

            oCell.Value = aVer[0];
            oCell       = oCurDoc.Cells.get_ItemByName("VERMIN");
            oCell.Value = aVer[1];
            oCell       = oCurDoc.Cells.get_ItemByName("VERBUL");
            oCell.Value = aVer[2];
            oCurDoc.Save();
            oCurDoc.Close(1);
        }
예제 #2
0
        /// <summary>
        /// Update cells in makebuild.cvw document
        /// </summary>
        /// <param name="i_args"></param>
        /// <param name="sDocPath"></param>
        private void RunUpdateCell(CvGtwyDocument i_oCVDoc, string sBuild, string [] i_args)
        {
            // Update cell values in document
            string[]   aVer  = i_args;
            CvGtwyCell oCell = i_oCVDoc.Cells.get_ItemByName("VERMAJ");

            oCell.Value = aVer[0];
            oCell       = i_oCVDoc.Cells.get_ItemByName("VERMIN");
            oCell.Value = aVer[1];
            oCell       = i_oCVDoc.Cells.get_ItemByName("VERBUL");
            oCell.Value = aVer[2];
            oCell       = i_oCVDoc.Cells.get_ItemByName("VERREV");
            oCell.Value = aVer[3];
            // Set the popup cell
            oCell = i_oCVDoc.Cells.get_ItemByName("WPGTEMPDIR");
            switch (sBuild)
            {
            case "AUDITUS":
                oCell.PopupSelection = 3;
                break;

            case "AUDITINT":
                oCell.PopupSelection = 2;
                break;

            case "AUDITCWI":
                oCell.PopupSelection = 1;
                break;

            case "PCUTIL":
                oCell.PopupSelection = 0;
                break;

            default:
                oCell.PopupSelection = 0;
                break;
            }
            i_oCVDoc.Save();
        }