void ControllaObbligatorietaResp() { object idflowchart = Conn.GetSys("idflowchart"); if (idflowchart == null || idflowchart == DBNull.Value) { return; //Nessuna restrizione } if (!GestioneClass.UsesAttribues(Conn)) { return; } if (myPrymaryTable.Columns.Contains("idsor01")) { return; //ci sono gli attributi, non serve limitare il resp } if (myPrymaryTable.Columns.Contains("idman")) { DataColumn C1 = myPrymaryTable.Columns["idman"]; C1.AllowDBNull = false; HelpForm.SetDenyZero(C1, true); C1.Caption = "Responsabile"; C1.DefaultValue = CalcDefaultForManager(); } if (myPrymaryTable.Columns.Contains("idmananager")) { DataColumn C2 = myPrymaryTable.Columns["idmananager"]; C2.AllowDBNull = false; HelpForm.SetDenyZero(C2, true); C2.Caption = "Responsabile"; C2.DefaultValue = CalcDefaultForManager(); } }