Ejemplo n.º 1
0
        private void toPostOpForm(int pos_row, int pos_column)
        {
            PostOPTableDataRow p = _dataRowsArray[pos_row - 1];

            p.fetchODOSInfo();

            string click_part = (pos_column == 1) ? "OD" : "OS";
            string OPuuid     = (pos_column == 1) ? p.ODpostOpUUID : p.OSpostOpUUID;



            PostOPForm f = new PostOPForm(OPuuid, theOperativeCase.caseuuid, click_part, p.startDateString, p.endDateString);

            f.finishAction = (PostOPForm.PostOPFinishedAction action, string postuuid) =>
            {
                if (action == PostOPForm.PostOPFinishedAction.IsRefresh)
                {
                    //f.Close();
                    return;
                }
                if (action == PostOPForm.PostOPFinishedAction.IsChildCase)
                {
                    //f.Hide();
                    string childCaseuuid = DBOperativeCase.caseuuidFromParentPostOPuuid(postuuid);
                    PreOperativeMainForm childPreOPForm = new PreOperativeMainForm(childCaseuuid, postuuid);
                    childPreOPForm.ShowDialog();
                    childPreOPForm.Dispose();
                }
                renewDataRowsArray();
            };

            PostOPForm.Temp = this;
            Update_TabPage("postOPForm", f, OPuuid, theOperativeCase.caseuuid, click_part, p.startDateString, p.endDateString);

            this.passtabControl += new PasstabControl(f.ReceivepasstabControl);
            this.passtabControl(tabControlOperation);
            //f.ShowDialog();
            //f.Dispose();
            //f = null;
        }