//public static IEnumerable<int> StringToIntList(string str)
        //{
        //    if (String.IsNullOrEmpty(str))
        //        yield break;

        //    foreach (var s in str.Split(','))
        //    {
        //        int num;
        //        if (int.TryParse(s, out num))
        //            yield return num;
        //    }
        //}

        public void UpdateAction(int id, RoleMaster rolemaster, int[] actions)
        {
            db.spRoleActionUpdate(
                id,
                rolemaster.RoleName,
                rolemaster.IsValid,
                rolemaster.CreatedBy,
                rolemaster.ModifiedBy = 1,                  //(int)HttpContext.Current.Session["userid"],
                rolemaster.CreatedDate,
                rolemaster.ModifiedDate = DateTime.Now,
                string.Join(",", actions)
                );
        }