public Guidelinesnames Guidelinename(int studentcode) { Guidelinesnames Detail = new Guidelinesnames(); List <Guidelines> guidelinelist = new List <Guidelines>(); using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["con"].ConnectionString)) { using (SqlCommand cmd = new SqlCommand("usp_api_Exam_Guidelines_noticename", con)) { cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@studentcode", SqlDbType.Int).Value = studentcode; SqlDataAdapter sda = new SqlDataAdapter(cmd); DataTable dt = new DataTable(); sda.Fill(dt); if (dt.Rows.Count > 0) { foreach (DataRow dtrow in dt.Rows) { var slist = new Guidelines(); slist.guidelinecode = Convert.ToInt32(dtrow["guidelinecode"]); slist.guidlinename = Convert.ToString(dtrow["noticename"]); guidelinelist.Add(slist); } Detail.Guidelinesname = guidelinelist; } else { throw new HttpResponseException(HttpStatusCode.NoContent); } } } return(Detail); }
public DesignTimeline(StageView stage, Vex.Instance inst) : base(stage, inst) { selectedItems = new InstanceGroup(stage.InstanceManager); SnapStore = new SnapStore(this); BondStore = new BondStore(this); Guidelines = new Guidelines(this); }
public MoveAction(IEnumerable <CardElement> elements, Guidelines guidelines) { _guidelines = guidelines; _elements = elements.ToList(); _trackingRect = Bounds.FromRectangles(_elements.Select(el => el.Bounds)); _startingPoints = _elements.ToDictionary(x => x.Id, x => x.Bounds.TopLeft); _referencePoint = _trackingRect.TopLeft; }
public ResizeAction(CardElement element, string direction, Guidelines guidelines) { _element = element; _direction = direction; _original = element.Bounds; _final = element.Bounds; _guidelines = guidelines; _trackingPoint = GetTrackingPoint(element, direction); _referencePoint = _trackingPoint; }
public DesignerCanvas() { InitializeComponent(); _guidelines = new Guidelines(); _guidelinesAdorner = new GuidelinesAdorner(this, _guidelines); Loaded += (s, e) => { var adornerLayer = AdornerLayer.GetAdornerLayer(this); adornerLayer.Add(_guidelinesAdorner); }; _guidelines.LinesUpdated += (s, e) => { _guidelinesAdorner.InvalidateVisual(); }; }