Ejemplo n.º 1
0
        public static int SaveTblRights(NewRightsModel model)
        {
            try
            {
                string        query    = "SaveTblRights";
                DbParameter[] ObjParam = new DbParameter[9];

                ObjParam[0] = new DbParameter("@ID", DbParameter.DbType.Int, 0, model.ID);
                ObjParam[1] = new DbParameter("@PageId", DbParameter.DbType.Int, 0, model.PageId);
                ObjParam[2] = new DbParameter("@GroupId", DbParameter.DbType.Int, 0, model.GroupId);
                ObjParam[3] = new DbParameter("@HasAccess", DbParameter.DbType.Bit, 0, model.HasAccess);
                ObjParam[4] = new DbParameter("@IsRead", DbParameter.DbType.Bit, 0, model.IsRead);
                ObjParam[5] = new DbParameter("@IsWrite", DbParameter.DbType.Bit, 0, model.IsWrite);
                ObjParam[6] = new DbParameter("@IsDelete", DbParameter.DbType.Bit, 0, model.IsDelete);
                ObjParam[7] = new DbParameter("@IsUpdate", DbParameter.DbType.Bit, 0, model.IsUpdate);
                ObjParam[8] = new DbParameter("@ParlourId", DbParameter.DbType.UniqueIdentifier, 0, model.ParlourId);


                return(Convert.ToInt32(DbConnection.GetScalarValue(CommandType.StoredProcedure, query, ObjParam)));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
 protected void bntSubmintData_click(object sender, EventArgs e)
 {
     foreach (GridViewRow row in gvRight.Rows)
     {
         try
         {
             NewRightsModel rightsModel = new NewRightsModel();
             rightsModel.ID        = Convert.ToInt32((row.FindControl("hdfRightId") as HiddenField).Value);
             rightsModel.PageId    = Convert.ToInt32((row.FindControl("hdnPageId") as HiddenField).Value);
             rightsModel.GroupId   = Convert.ToInt32(ddlGroupId.SelectedItem.Value);
             rightsModel.HasAccess = Convert.ToBoolean((row.FindControl("chkhasRights") as CheckBox).Checked);
             rightsModel.IsRead    = Convert.ToBoolean((row.FindControl("chkIsRead") as CheckBox).Checked);
             rightsModel.IsWrite   = Convert.ToBoolean((row.FindControl("chkIsWrite") as CheckBox).Checked);
             rightsModel.IsDelete  = Convert.ToBoolean((row.FindControl("chkIsDelete") as CheckBox).Checked);
             rightsModel.IsUpdate  = Convert.ToBoolean((row.FindControl("chkIsUpdate") as CheckBox).Checked);
             rightsModel.ParlourId = ParlourId;
             _client.SaveTblRights(rightsModel);
         }
         catch { }
     }
     ResetAll();
     LoadDropdownGroupData();
 }
Ejemplo n.º 3
0
 public static int SaveTblRights(NewRightsModel model)
 {
     return(RightsDAL.SaveTblRights(model));
 }