//saves doctor shift
        public static void staffShiftSave(StaffShiftsHL staffShi)
        {
            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.Connection  = Common.getConnection();
                cmd.CommandText = "Staff_Shift_Insert";
                cmd.CommandType = System.Data.CommandType.StoredProcedure;

                //Shift Name
                SqlParameter sShiftName = new SqlParameter("@shiftName", staffShi.shiftName);
                sShiftName.SqlDbType = System.Data.SqlDbType.NVarChar;
                cmd.Parameters.Add(sShiftName);

                //From
                SqlParameter tFrom = new SqlParameter("@from", staffShi.from);
                tFrom.SqlDbType = System.Data.SqlDbType.Time;
                cmd.Parameters.Add(tFrom);

                //To
                SqlParameter tTo = new SqlParameter("@to", staffShi.to);
                tTo.SqlDbType = System.Data.SqlDbType.Time;
                cmd.Parameters.Add(tTo);

                cmd.ExecuteNonQuery();
            }
        }
        //gets staffShifts list
        public static List <StaffShiftsHL> getStaffShifts()
        {
            List <StaffShiftsHL> staffShiftsList = new List <StaffShiftsHL>();

            using (SqlCommand cmd = new SqlCommand())
            {
                cmd.Connection  = Common.getConnection();
                cmd.CommandText = "Staff_Shift_Select";
                cmd.CommandType = System.Data.CommandType.StoredProcedure;

                SqlDataAdapter da = new SqlDataAdapter(cmd);
                DataTable      dt = new DataTable();
                da.Fill(dt);
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    StaffShiftsHL ss = new StaffShiftsHL();
                    ss.shiftId   = Int32.Parse(dt.Rows[i]["shiftId"].ToString());
                    ss.shiftName = dt.Rows[i]["shiftName"].ToString();
                    ss.from      = (TimeSpan)dt.Rows[i]["from"];
                    ss.to        = (TimeSpan)dt.Rows[i]["to"];
                    staffShiftsList.Add(ss);
                }
            }
            return(staffShiftsList);
        }