Exemple #1
0
 /// <summary>
 /// After Save
 /// </summary>
 /// <param name="newRecord">new</param>
 /// <param name="success">success</param>
 /// <returns>success</returns>
 protected override Boolean AfterSave(Boolean newRecord, Boolean success)
 {
     if (newRecord)
     {
         int         AD_Role_ID = GetCtx().GetAD_Role_ID();
         MFormAccess pa         = new MFormAccess(this, AD_Role_ID);
         pa.Save();
     }
     return(success);
 }
Exemple #2
0
        private void InsertNewRecordInRole()
        {
            DataSet ds = DB.ExecuteDataset("SELECT AD_Role_ID FROM AD_Role_Group WHERE ad_groupinfo_id=" + GetAD_GroupInfo_ID());

            if (ds != null && ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                {
                    MFormAccess access = new MFormAccess(GetCtx(), 0, null);
                    access.SetAD_Form_ID(GetAD_Form_ID());
                    access.SetAD_Role_ID(Convert.ToInt32(ds.Tables[0].Rows[i]["AD_Role_ID"]));
                    access.SetIsReadWrite(true);
                    access.Save();
                }
            }
        }